LiveLink™ for MATLAB® Updates

For users of LiveLink™ for MATLAB®, COMSOL Multiphysics® software version 5.3 brings new and updated wrapper functions and usability improvements. Browse all LiveLink™ for MATLAB® updates below.

New and Improved Wrapper Functions

mphray and mphparticle

The new mphray function has been added to support ray optics and ray acoustics data sets.

The mphparticle and mphray functions now support the properties solnum, outersolnum, times, and velocities. These new options give improved access to ray and particle data from parametric sweep studies.

mphplot, mphgeom, and mphmesh

Support for views has been introduced for the mphplot, mphgeom, and mphmesh functions. This means that some of the view settings that are associated with various plots in the COMSOL Multiphysics® software are used when creating the plots in the MATLAB® software. The new syntax lets you supply a specific tag for a 'view' or use the value 'auto' of a view based on the plot type.

mphplot(model, 'pg1', 'view', 'view1')

mphgeom(model, 'geom1', 'view', 'view1')

mphmesh(model, 'mesh1', 'view', 'view1')

Plots will now show units, such as for length or other units depending on the plot type, on axes representing different functions. If a model hides certain geometry objects when showing a geometry in COMSOL Multiphysics®, this is supported when using mphgeom. Note that camera view positions and lights are not handled due to differences between COMSOL Multiphysics® and MATLAB® graphics. New plot types supported by mphplot are: Height Aberration plots, Arrow Surface plots (normal and tangent angles), Streamline Surface plots, and Line plots with two y-axes.


Thumbnails are now preserved by default when loading and saving models, instead of silently removed. This is a precursor to the new mphthumbnail function, which enables you to get and set the thumbnail images of models.


The mphdoc function allows you to access the COMSOL documentation. You can now receive help for all nodes in the model object tree, as well as for all wrapper functions that come with LiveLink™ for MATLAB®. Additionally, you can open the COMSOL® API for use with Java® documentation, which gives detailed information about all of the classes and methods available for controlling COMSOL® models from the MATLAB® software. A general documentation window can be opened that gives access to the entire set of COMSOL documentation, which you can search and browse through. Access to the help documentation is added to mphnavigator to help you find the right documentation pages.


You can now connect to a COMSOL Multiphysics® server from MATLAB® and COMSOL Multiphysics® at the same time. This way, you can access all model settings from either environment without having to repeatedly save and load the model. This provides a more user-friendly workflow, where you can use the environment that is most suited for the task and the preference you prefer. The new function mphlaunch makes it possible to start a COMSOL Multiphysics® client and connect the same server that MATLAB® is connected to — and load a model that is currently used in the MATLAB® environment.

Access to Functions from the Apps Tab of the MATLAB® Ribbon or Toolstrip

By installing the LiveLink for MATLAB.mltbx file, you gain access to four functions from the Apps tab in the ribbon in MATLAB®. This makes it easy to perform common tasks such as loading and searching for models, navigating the model object structure, and viewing the model settings. Instead of running the mphmodellibrary, mphnavigator, mphopen, and mphsearch functions, there are now buttons for performing these tasks.

A screenshot of MATLAB R2017a with the Apps tab open, featuring functions from LiveLink for MATLAB. The Apps tab in the MATLAB® ribbon now provides access to the following functions from LiveLink™ for MATLAB®: COMSOL Model Library (mphmodellibrary), COMSOL Model Navigator (mphnavigator), COMSOL Open (mphopen), and COMSOL Search (mphsearch). The Apps tab in the MATLAB® ribbon now provides access to the following functions from LiveLink™ for MATLAB®: COMSOL Model Library (mphmodellibrary), COMSOL Model Navigator (mphnavigator), COMSOL Open (mphopen), and COMSOL Search (mphsearch).

MATLAB is a registered trademark of The MathWorks, Inc. Oracle and Java are registered trademarks of Oracle and/or its affiliates. COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by these trademark owners.