How Structure Inputs and Outputs Interface with Bus Signals
Buses in a Simulink® model appear inside the MATLAB Function block as structures; structure outputs from the MATLAB Function block appear as buses in Simulink models. When you create structure inputs, the MATLAB Function block determines the type, size, and complexity of the structure from the input signal. When you create structure outputs, you must define their type, size, and complexity in the MATLAB® function.
You connect structure inputs and outputs from MATLAB Function blocks to any bus signal, including:
Blocks that output bus signals — such as Bus Creator blocks
Blocks that accept bus signals as input — such as Bus Selector and Gain blocks
Other MATLAB Function blocks
You can use global bus type data in Data Store Memory blocks with MATLAB Function blocks. For more information on using buses and Data Store Memory, see Data Stores with Buses and Arrays of Buses.
Working with Virtual and Nonvirtual Buses
MATLAB Function blocks supports nonvirtual buses only (see Types of Composite Signals). For MATLAB Function block bus inputs, incoming virtual bus signals are converted to nonvirtual buses.