Documentation

Declare Variable-Size Inputs and Outputs

By default, a MATLAB Function block input signal or output signal is not variable-size. To make the signal variable-size:

  1. In the MATLAB Function Block Editor, select Edit Data.

  2. Select the input or output signal.

  3. Select the Variable size check box.

  4. Enter the size according to this table.

    For:Specify
    Input To inherit the size from Simulink®, enter -1.

    Otherwise, specify the explicit size and upper bound. For example, to specify a 2-by-4 matrix, enter [2 4].

    OutputSpecify the explicit size and upper bound.

Related Topics

Was this topic helpful?