To define structure parameters in MATLAB Function blocks, follow these steps:
Define and initialize a structure variable
A common method is to create a structure in the base workspace. For other methods, see Structure Parameters.
In the Ports and Data Manager, add data in the MATLAB Function block with the following properties:
|Property||What to Specify|
|Name||Enter same name as the structure variable you defined in the base workspace|
|Tunable||Leave checked if you want to change (tune) the value of the parameter during simulation; otherwise, clear to make the parameter non-tunable and preserve the initial value during simulation|
FIMATH properties for non-tunable structure parameters containing fixed-point values are based on the initial values of the structure. They do not come from the FIMATH properties specified for fixed-point input signals to the parent MATLAB Function block. (These FIMATH properties appear in the properties dialog box for MATLAB Function blocks.)