Types of Structures in MATLAB Function Blocks
In MATLAB Function blocks, you can define structure data as inputs or outputs that interact with bus signals. MATLAB Function blocks also support arrays of buses. You can also define structures inside MATLAB® functions that are not part of MATLAB Function blocks.
The following table summarizes how to create different types of structures in MATLAB Function blocks:
|Scope||How to Create||Details|
|Input||Create structure data with scope of ||You can create structure data as inputs or outputs in the top-level MATLAB function for interfacing to other environments. See Create Structures in MATLAB Function Blocks.|
|Output||Create structure data with scope of |
|Local||Create a local variable implicitly in a MATLAB function.||See Define Scalar Structures for Code Generation.|
|Persistent||Declare a variable to be persistent in a MATLAB function.||See |
|Parameter||Create structure data with scope of ||See Define and Use Structure Parameters.|
Structures in MATLAB Function blocks can contain fields of any type and size, including mux signals, buses, and arrays of structures.