| Writing S-Functions | ![]() |
Specify information about the dimensionality of an output port
Syntax
Arguments
S
SimStruct representing an S-function block.
Structure of type DimsInfo_T that specifies the dimensionality of the signals emitted by port.
See ssSetInputPortDimensionInfo for a description of this structure.
Description
Specifies the dimension information for port. Use this function in mdlInitializeSizes to initialize the output port dimension info. If you want the port to inherit its dimensionality from the block to which it is connected, specify DYNAMIC_DIMENSION as the dimsInfo for port.
Languages
Example
The following example specifies that input port 0 accepts 2-by-2 matrix signals.
DECL_AND_INIT_DIMSINFO(di);
di.numDims = 2;
int dims[2];
dims[0] = 2;
dims[1] = 2;
di.dims = &dims;
di.width = 4;
ssSetOutputPortDimensionInfo(S, 0, &di);
See Also
| ssSetOutputPortDataType | ssSetOutputPortFrameData | ![]() |
© 1994-2005 The MathWorks, Inc.