LiveLink™ for MATLAB® UpdatesFor users of LiveLink™ for MATLAB®, COMSOL Multiphysics® version 6.2 provides new functionality for plots, functions for setting parameter values, and Model Manager support. Read more about these updates below.
In previous versions, when using the functions mphplot, mphgeom, and mphmesh for plotting, the View subsettings for lighting and hiding could be accessed using the view property. In this version, when calling these functions, the lighting and hiding View subsettings are now enabled by default. In addition, the plots in MATLAB® now show labels for the x-, y-, and z-axes, making them visually similar to the plots seen in COMSOL Multiphysics®.
Functions for Changing Parameters
In LiveLink™ for MATLAB®, changing parameter values and re-solving a model is a commonly used technique. A new mphsetparam function has been added to streamline the process of setting parameter values and passing them between functions. In addition, a new setparam function provides the ability to set parameter values (either real or complex) using MATLAB® numerical types and strings. These values can be set within a single variable name using cell arrays, structures, and dictionaries, making it easier to transfer parameters from one function to another. Parameter groups and parameter cases are also now supported, and the existing functions mphevaluate and mphgetexpressions can be used to evaluate parameter values and expressions involving parameters, respectively.
Model Manager Support
The Model Manager is used to store and manage COMSOL models and other related files in a database. In version 6.2 of LiveLink™ for MATLAB®, an API has been added to the Model Manager that can be used to modify such models and files. There are new wrapper functions that can be used to load, save, and search for models. For example, the mmsearch function can be used to search for models in a specific branch. The function then returns results in MATLAB® structure arrays that can be easily modified and displayed in MATLAB®.