Specify information about the dimensionality of an output port
int_T ssSetOutputPortDimensionInfo(SimStruct *S, int_T port, const DimsInfo_T *dimsInfo)
SimStruct representing an S-Function block.
Index of an output port.
Structure of type DimsInfo_T that specifies the dimensionality of the signals emitted by port.
See ssSetInputPortDimensionInfo for a description of this structure.
Specifies the dimension information for port. Use this function in mdlInitializeSizes to initialize the output port dimension information. 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. In this case, the S-function must provide mdlSetOutputPortDimensionInfo and mdlSetDefaultPortDimensionInfo methods to enable the signal dimensions to be set correctly during signal propagation.
The following example specifies that output port 0 emits 2-by-2 matrix signals.
DECL_AND_INIT_DIMSINFO(di); int_T dims; di.numDims = 2; dims = 2; dims = 2; di.dims = dims; di.width = 4; ssSetOutputPortDimensionInfo(S, 0, &di);