Wrapper Functions
LiveLink™ for MATLAB® comes with a suite of functions to help you modify the model object. These functions are mainly for retrieving information and data from a model, but there are also functions for updating data. The wrapper functions are meant as an aid in working with the COMSOL API and cover the most common scenarios where MATLAB is used to work with COMSOL models.
To get the complete list of the wrapper function, once you have started COMSOL with MATLAB, enter:
help mli
When working with wrapper functions, you benefit from autocompletion to enter valid arguments and properties.
For example, to load a model and show a plot in MATLAB you can do:
mphopen busbar
mphplot(model,'pg1')
In order to observe how autocompletion works, you can write
mphplot(
and press the Tab key. Then the model variable (usually model) will appear. If you then enter a comma and press the Tab key again, the plot group tags in the model will appear. You can use Tab completion to further enter property names and values where applicable.