LiveLink™ for MATLAB®
Interface MATLAB® with COMSOL Multiphysics® via LiveLink™ for MATLAB®

Example illustrating the modeling of a spring-loaded centrifugal governor. All plots that can be shown in COMSOL Multiphysics® can also be shown as MATLAB® figures.
Integrate COMSOL Multiphysics® with MATLAB® Scripting
Seamlessly integrate COMSOL Multiphysics® with MATLAB® to extend your modeling with scripting programming in the MATLAB environment. LiveLink™ for MATLAB® allows you to utilize the full power of MATLAB and its toolboxes in preprocessing, model manipulation, and postprocessing:- Enhance your in-house MATLAB code with powerful multiphysics simulations
- Base your geometry modeling on probabilistic or image data
- Perform arbitrary statistical analysis on simulation results
- Use multiphysics models together with Monte Carlo simulations and genetic algorithms
- Export COMSOL models on state-space matrix format for incorporating into control systems
- Call MATLAB functions from the COMSOL Desktop®
MATLAB is a registered trademark of The MathWorks, Inc. All other trademarks are the property of their respective owners. For a list of such trademark owners, see http://www.comsol.com/tm. COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by these trademark owners.
Product Features
- Use MATLAB® as a scripting tool to set up and solve your COMSOL models
- Import/export data from/to the MATLAB® workspace
- Interface in the COMSOL Desktop® environment enables the use of MATLAB® functions while modeling
- A suite of dedicated functions for ease-of-use
Application Areas
- Preprocess data, such as images and experiments, to include in your models
- Extract data from your models for customized postprocessing and visualization
- Manipulate your models from the command line or script to parameterize the geometry, physics, or the solution scheme
- Use MATLAB®'s GUI building tools to create custom-made graphical user interfaces for your models for deployment to users in your organization
- Define model settings using MATLAB® functions
- Wrap the solution process in a loop where you can: handle different cases in the solution process; stop and restart a solution based on a specified solution; formulate custom initial conditions
Supported File Formats
File Format | Extension | Import | Export |
---|---|---|---|
MATLAB®: Function | .m | Yes | No |
Electrical Heating in a Busbar Assembly
Model of electrical heating of a busbar that demonstrates how to use LiveLink™ for SolidWorks® together with LiveLink™ for MATLAB®. The MPH-file required to run the model can be found in [Electrical Heating in a Busbar Assembly](/model/electrical-heating-in-a-busbar-assembly-9219)
Homogenization in a Chemical Reactor
This model illustrates how to simulate a periodic homogenization process in a space dependent chemical reactor model. This homogenization removes concentration gradients in the reactor at a set time interval. The model demonstrates a technique by which you can first stop the time-dependent solver, then restart it with an initial value obtained ...
Convective Heat Transfer with Pseudo-Periodicity
This model simulates convective heat transfer in a channel filled with water. To reduce memory requirements, the model is solved repeatedly on a pseudo-periodic section of the channel. Each solution corresponds to a different section, and before each solution step the temperature at the outlet boundary from the previous solution is mapped to the ...
Temperature Distribution in a Vacuum Flask
This example solves for the temperature distribution inside a vacuum flask holding hot coffee. The main purpose is to illustrate how to use MATLAB functions to define material properties and boundary conditions.
Domain Activation and Deactivation
Heating of an object from alternating regions is one example where the modeling technique of activating and deactivating physics on domains can be useful. This model demonstrates how you can apply this technique using LiveLink™ for MATLAB®.
Every business and every simulation need is different.
In order to fully evaluate whether or not the COMSOL Multiphysics® software will meet your requirements, you need to contact us. By talking to one of our sales representatives, you will get personalized recommendations and fully documented examples to help you get the most out of your evaluation and guide you to choose the best license option to suit your needs.
Just click on the "Contact COMSOL" button, fill in your contact details and any specific comments or questions, and submit. You will receive a response from a sales representative within one business day.
Next Step
Request a Software Demonstration