Input |
Create a Simulink.Bus object in
the base workspace to define the structure input. Add data to the MATLAB Function block,
as described in Adding Data to a MATLAB Function Block. The data
should have the following properties Scope = Input Type = Bus: <object
name> For <object name> , enter the name of
the Simulink.Bus object that defines the structure
input
See Rules for Defining Structures in MATLAB Function Blocks. |
Output |
Create a Simulink.Bus object in
the base workspace to define the structure output. Add data to the MATLAB Function block
with the following properties: Scope = Output Type = Bus: <object
name> For <object name> , enter the name of
the Simulink.Bus object that defines the structure
output
Define and initialize the output structure implicitly
as a variable in the MATLAB® function, as described in Structure Definition for Code Generation. Make sure the number, type, and size of fields in
the output structure variable definition match the properties of the Simulink.Bus object.
|
Local | Define the structure implicitly as a local variable in
the MATLAB function, as described in Structure Definition for Code Generation.
By default, local variables in MATLAB Function blocks
are temporary. |
Persistent | Define the structure implicitly as a persistent variable
in the MATLAB function. |
Parameter |
Create a structure variable in the base workspace. Add data to the MATLAB Function block
with the following properties:
See Define and Use Structure Parameters. |