LiveLink™ for MATLAB® Updates

For users of LiveLink™ for MATLAB®, COMSOL Multiphysics® version 6.1 introduces new functions for:

  • Working with models stored in the Model Manager
  • Datasets
  • Solving models while showing the progress bar

Read more about these updates below.

Model Manager Support

This version introduces new functions for working with models that are stored in Model Manager databases. You can now open a COMSOL model by using the mphopen or mphload functions with a location parameter, in the form of a Uniform Resource Identifier (URI), that identifies the model's location within the Model Manager. The new mmsave function can be used to store the edited model as a draft or final version. In the case that a model has not been previously loaded into the Model Manager, the new mmgetbranch function is used to obtain a branch variable that can also be used as an argument to mmsave. This is accomplished by using the following syntax:

branch = mmgetbranch('Main', 'Repository 1', 'MyDatabase'); mmsave = mmsave(model, 'version', 'commit message', 'branch', branch);

In addition, the mmmodelinfo function can be used to retrieve information from a model stored in the Model Manager without opening the model. This function also works for models stored as MPH files on disk.

Dataset Functions

With the number of dataset types growing as you work on a model, it can be difficult to keep track of datasets using the command line in MATLAB® or the mphnavigator. To make it easier to get an overview of the datasets in a model, two new functions have been introduced: the mphdataset, which can be used to plot datasets, and mphdatasetinfo, which can be used to retrieve information about datasets. These functions are useful when working with parametric designs of datasets that depend on a varying geometry or datasets that depend on other datasets.

New Mphrun Function

A new mphrun function makes it possible to call the run() method on Model Builder nodes, enabling you to call several run methods in succession. Additionally, when building or solving, a progress bar now appears automatically and then disappears when finished to avoid cluttering the screen. As an example, you can use this command to call run() on the solver sequences Solution 1 and Solution 3 by using the following syntax:

mphrun(model, {'sol1' 'sol3'}).


MATLAB is a registered trademark of The MathWorks, Inc.