Writing S-Functions    
mdlSetDefaultPortDimensionInfo

Set the default dimensions of the signals accepted or emitted by an S-function's ports.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

Description

Simulink calls this method during signal dimension propagation when a model does not supply enough information to determine the dimensionality of signals that can enter or leave the block represented by S. This method should set the dimensions of any input and output ports that are dynamically sized to default values. If S does not implement this method, Simulink sets the dimensions of dynamically sized ports for which dimension information is unavailable to scalar, i.e., 1-D signals containing one element.

Example

See matlabroot/simulink/src/sfun_matadd.c for an example of how to use this function.

Languages

C

See Also

ssSetOutputPortMatrixDimensions, ssSetErrorStatus


  mdlSetDefaultPortDataTypes mdlSetInputPortComplexSignal