Main Content

ssSetInputPortMatrixDimensions

Specify dimension information for an input port that accepts matrix signals

Syntax

int_T ssSetInputPortMatrixDimensions(SimStruct *S, int_T port, int_T m, int_T n)

Arguments

S

SimStruct representing an S-Function block.

port

Index of an input port.

m

Row dimension of matrix signals accepted byportorDYNAMICALLY_SIZED.

n

列维度矩阵信号的接受portorDYNAMICALLY_SIZED.

Returns

1if successful; otherwise,0.

Description

Use this function to specify thatportaccepts anm-by-nmatrix signal. If either dimension isDYNAMICALLY_SIZED, the other must beDYNAMICALLY_SIZEDor1. If either dimension is dynamically sized, the S-function must providemdlSetInputPortDimensionInfoandmdlSetDefaultPortDimensionInfomethods to enable the signal dimensions to be set correctly during signal propagation.

Languages

C, C++

Example

The following example specifies that input port 0 accepts 2-by-2 matrix signals.

ssSetInputPortMatrixDimensions(S, 0, 2, 2);

See the S-functionsfun_frmunbuff.cused insfcndemo_framefor a complete example that uses this function. Running this model requires a DSP System Toolbox™ license.

Introduced before R2006a