Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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 by port or DYNAMICALLY_SIZED.

n

Column dimension of matrix signals accepted by port or DYNAMICALLY_SIZED.

Returns

1 if successful; otherwise, 0.

Description

Use this function to specify that port accepts 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 mdlSetInputPortDimensionInfo and mdlSetDefaultPortDimensionInfo methods 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-function sfun_frmunbuff.c used in sfcndemo_frame for a complete example that uses this function. Running this model requires a DSP System Toolbox™ license.

Introduced before R2006a

Was this topic helpful?