|On this page…|
Simulink® blocks can output one-dimensional, two-dimensional, or multidimensional signals. The Simulink user interface and documentation generally refer to 1-D signals as vectors and 2-D or multidimensional signals as matrices. A one-element array is frequently referred to as a scalar. A row vector is a 2-D array that has one row. A column vector is a 2-D array that has one column.
A one-dimensional (1-D) signal consists of a series of one-dimensional arrays output at a frequency of one array (vector) per simulation time step.
A two-dimensional (2-D) signal consists of a series of two-dimensional arrays output at a frequency of one 2-D array (matrix) per block sample time.
A multidimensional signal consists of a series of multidimensional (two or more dimensions) arrays output at a frequency of one array per block sample time. You can specify multidimensional arrays with any valid MATLAB® multidimensional expression, such as [4 3]. See Multidimensional Arrays for information on multidimensional arrays.
Simulink blocks vary in the dimensionality of the signals they can accept or output. Some blocks can accept or output signals of any dimension. Some can accept or output only scalar or vector signals. To determine the signal dimensionality of a particular block, see the block documentation. See Determine Output Signal Dimensions for information on what determines the dimensions of output signals for blocks that can output nonscalar signals.
Note: Simulink does not support dynamic signal dimensions during a simulation. That is, the dimension of a signal must remain constant while a simulation is executing. However, you can change the size of a signal during a simulation. See Variable-Size Signal Basics.
The Simulink Block Data Type Support table includes a column identifying the blocks with multi-dimension signal support.
In the Simulink editor, from the Help menu, click Simulink > Block Data Types & Code Generation Support > All Tables.
A separate window with the Simulink Block Data Type Support table opens.
In the Block column, locate the name of a Simulink block. Columns to the right are data types or features. An a X in a column indicates support for that feature.
Simulink supports signals with up to 32 dimensions. Do not use signals with more than 32 dimensions.