Matlab Plug-In Features
The Matlab Plug-In has two main features:
Mapping Matlab Variables to ModelCenter Variables
Variables are created in the Matlab Plug-In by selecting the <click to add variable...> text in the ModelCenter Variables pane. Upon selection, the plug-in will prompt the user to enter variable information.

After creating a variable, property fields will be enabled.
Variable Properties
Properties for each variable can be customized. Note that the type of a variable determines which properties are available for editing. Property values are optional with the exception of the Matlab Name value which must be specified for each variable.

-
Type - Both the type and state may be specified for a variable. Note that the
ModelCenter and the Matlab Plug-In currently do not support variables of type
"single". Instead, a ModelCenter "double" can be used to represent a Matlab
"single". The table below shows type mapping between Matlab variables and
ModelCenter variables. The variable state can either be input or output.
Matlab syntax Matlab type ModelCenter type A = 1 1*1 array double A = [1 2] 1*2 array double[] A = [1 2; 3 4] 2*2 array double[] A = 1 1*1 array int A = [1 2] 1*2 array int[] A = true 1*1 array Boolean A = [true false] 1*2 array Boolean[] A = 'abc' string array string A = {'a', 'ab', 'abc'} cell array string[] Note: The new ModelCenter Component Plug-In framework cannot support "structure" types in the Matlab Plug-In. However, it is possible to create a similar function by enumerating every single property / element of the structure in the plug-in as a separate variable or separate array element (if same variable type). See the Structure Examples page. - Units - Units for the variable.
- Description - Short description of the variable.
- Lower Bound - Numeric lower bound value.
- Upper Bound - Numeric upper bound value.
- Enum Values - A comma separated list of acceptable values.
- Enum Aliases - A comma separate list of strings that can be used in place of the enum values. The number of enum aliases, if specified, must be equal to the number of enum values.
- Format - The format ModelCenter should use to display the variable.
- Matlab Name - The name of the corresponding variable in Matlab.
Editing Variables Textually
To edit the variables in a text view, press Edit Variable.... This will launch the Variables Text Editor dialog which can be used to quickly edit a set of variables.

Managing the Matlab Session
The Matlab Plug-In Options dialog allows you to customize the behavior of your plug-in.

Options
![]() |
|