ssSetOutputPortMatrixDimensions
Specify dimension information for an output port that emits matrix signals
Syntax
int_T ssSetOutputPortMatrixDimensions(SimStruct *S, int_T port, int_T m, int_T n)
Arguments
SSimStruct that represents an S-Function block.
portIndex of an output port.
mRow dimension of matrix signals emitted by
portorDYNAMICALLY_SIZED.nColumn dimension of matrix signals emitted by
portorDYNAMICALLY_SIZED.
Returns
1 if successful; otherwise, 0.
Description
Use this function to specify that port emits an
m-by-n matrix signal. If either dimension
is DYNAMICALLY_SIZED, the other must be
DYNAMICALLY_SIZED or 1. If either
dimension is dynamically sized, the S-function must provide mdlSetOutputPortDimensionInfo and
mdlSetDefaultPortDimensionInfo
methods to enable the signal dimensions to be set correctly during signal
propagation.
Languages
C, C++
Examples
The following example specifies that output port 0 emits 2-by-2 matrix signals.
ssSetOutputPortMatrixDimensions(S, 0, 2, 2);
See the S-function sfun_frmad.c used in sfcndemo_frame for a complete example that uses this
function. Running this model requires a DSP System Toolbox™ license.
See Also
Version History
Introduced before R2006a