LiveLink™ for MATLAB® Updates

For users of LiveLink™ for MATLAB®, COMSOL Multiphysics® software version 5.3a brings new and updated wrapper functions and usability improvements. For users of LiveLink™ for MATLAB® as an add-on to the COMSOL Server™ product, there is a new type of connection to COMSOL Server™. Browse all LiveLink™ for MATLAB® updates below.

Connection to the COMSOL Server™ Product

When you have installed LiveLink™ for MATLAB® with the COMSOL Client, you can now connect the COMSOL Client inside the MATLAB® software to the COMSOL Server™ product. Practically speaking, this means you can use MATLAB® functions in apps and establish a connection from MATLAB® to COMSOL Server™ to access the COMSOL API.

An example of connecting to COMSOL Server™ when using LiveLink™ for MATLAB®.

Installed with the COMSOL Client, the shortcut for starting the COMSOL Client with MATLAB® brings up the Connect to COMSOL Server™ window that you can use to establish a connection to COMSOL Server™ and start the COMSOL Client inside MATLAB®.

Installed with the COMSOL Client, the shortcut for starting the COMSOL Client with MATLAB® brings up the Connect to COMSOL Server™ window that you can use to establish a connection to COMSOL Server™ and start the COMSOL Client inside MATLAB®.

New and Improved Wrapper Functions

mphreduction

The new wrapper function mphreduction makes it possible to extract reduced-order state-space matrices from a time-dependent model. The extracted state-space matrices can be used for simulation, control design, and other types of model analyses. For more information on model reduction, see the Studies and Solvers Updates.

mphplot

Using mphplot(model) you can now generate a MATLAB® figure window where you can easily switch between geometry, mesh, and result plots in the model, all within the same window. With buttons on the toolbar, you can switch lights on/off and switch between views. The camera positions are also stored when switching between different plots in the figure window.

A demonstration of mphplot. A new menu and a toolbar are added to the MATLAB® figure window generated with mphplot(model). This makes it easier to switch between plots while maintaining viewpoints for the camera as you switch.
A new menu and a toolbar are added to the MATLAB® figure window generated with mphplot(model). This makes it easier to switch between plots while maintaining viewpoints for the camera as you switch.

mphmesh

The wrapper function mphmesh has improved support for views and supports the hiding of geometric entities.

mphthumbnail

The wrapper function mphthumbnail can now directly use the graphics displayed in a MATLAB® figure window for creating a model thumbnail that can be saved when the model file is saved. You can also use it to clear a thumbnail, if so desired.

Improvements to Adding Functions Defined by M-Files in the MATLAB® Software to Models

Functions defined under the Global Definitions in a COMSOL Multiphysics® model, including those functions that are defined by M-files in MATLAB®, are now available for use in all text fields and in table cells that previously supported the use of global parameters. This makes it possible to use these functions when defining parameters that are used, for example, for creating geometries and meshes. For more information on this feature, see the COMSOL Desktop® Updates.


MATLAB is a registered trademark of The MathWorks, Inc. COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by this trademark owner.