By default, a MATLAB Function block input signal or output signal is not variable-size. To make the signal variable-size:
In the MATLAB Function Block Editor, select Edit Data.
Select the input or output signal.
Select the Variable size check box.
Enter the size according to this table.
| For: | Specify |
|---|---|
| Input | To inherit the size from Simulink®, enter Otherwise, specify the
explicit size and upper bound. For example, to specify a 2-by-4 matrix, enter
|
| Output | Specify the explicit size and upper bound. |