Documentation

Signal Dimensions

Configure signal dimensions for input and output ports

S-Function Callback Methods

mdlInitializeSizesSpecify the number of inputs, outputs, states, parameters, and other characteristics of the C MEX S-function
mdlSetDefaultPortDimensionInfoSet the default dimensions of the signals accepted or emitted by a C MEX S-function's ports
mdlSetWorkWidthsSpecify the sizes of the work vectors and create the run-time parameters required by this C MEX S-function
mdlSetInputPortDimensionInfoSet the dimensions of the signals accepted by an input port
mdlSetInputPortDimensionsModeFcnPropagate the dimensions mode
mdlSetInputPortWidthSet the width of an input port that accepts 1-D (vector) signals
mdlSetOutputPortDimensionInfoSet the dimensions of the signals accepted by an output port
mdlSetOutputPortWidthSet the width of an output port that outputs 1-D (vector) signals

SimStruct Functions

ssSetInputPortDimensionInfoSpecify information about the dimensionality of an input port
ssSetInputPortDimensionsModeSet the dimensions mode of the input port indexed by pIdx
ssSetInputPortDimsSameAsOutputPortDimsSet the dimensions of output port outIdx to be equal to the dimensions of input port inpIdx. This method is called from mdlSetWorkWidths.
ssSetInputPortMatrixDimensionsSpecify dimension information for an input port that accepts matrix signals
ssSetInputPortVectorDimensionSpecify dimension information for an input port that accepts vector signals
ssSetInputPortWidthSpecify the width of an input port
ssPruneNDMatrixSingletonDimsPrune trailing singleton dimensions
ssSetCurrentOutputPortDimensionsSet the current size corresponding to dimension dIdx of the output signal at port pIdx.
ssSetOutputPortDimensionInfoSpecify information about the dimensionality of an output port
ssSetOutputPortDimensionsModeSet the dimensions mode of the output port indexed by pIdx
ssSetOutputPortMatrixDimensionsSpecify dimension information for an output port that emits matrix signals
ssSetOutputPortVectorDimensionSpecify dimension information for an output port that emits vector signals
ssSetOutputPortWidthSpecify the width of an output port
ssSetOutputPortMatrixDimensionsSpecify dimension information for an output port that emits matrix signals
ssAddOutputDimsDependencyRuleRegister a method to handle current dimensions update.
ssAddVariableSizeSignalsRuntimeCheckerRegister a method to check the current input dimensions
ssAllowSignalsWithMoreThan2DEnable S-function to work with multidimensional signals
ssRegMdlSetInputPortDimensionsModeFcnRegister the method to handle dimensions mode propagation for each input port.
ssSetDWorkRequireResetForSignalSizeSet the block flag for resetting the dIndex Dwork size upon subsystem reset.
ssSetSignalSizesComputeTypeSet the type of output dependency on the input signal.
ssSetVectorModeSpecify the vector mode that an S-function supports
ssGetCurrentInputPortDimensionsGet the current size of dimension dIdx of input port pIdx
ssGetCurrentInputPortWidthGet the total width (total number of elements) of the signal at input port pIdx
ssGetInputPortDimensionsGet the dimensions of the signal accepted by an input port
ssGetInputPortDimensionSizeGet the size of one dimension of the signal entering an input port
ssGetInputPortDimensionsModeGet the dimensions mode of the input port indexed by pIdx
ssGetInputPortNumDimensionsGet the dimensionality of the signals accepted by an input port
ssGetInputPortWidthGet the width of an input port
ssGetCurrentOutputPortDimensionsGet the current size of dimension dIdx of the signal at output port pIdx.
ssGetCurrentOutputPortWidthGet the total width (total number of elements) of the signal at output port pIdx.
ssGetOutputPortDimensionsGet the dimensions of the signal leaving an output port
ssGetOutputPortDimensionSizeGet the size of one dimension of the signal leaving an output port
ssGetOutputPortDimensionsModeGet the dimensions mode of the output port indexed by pIdx
ssGetOutputPortNumDimensionsGet the number of dimensions of an output port
ssGetOutputPortWidthGet the width of an output port

Examples and How To

Input and Output Ports

How to create input and output ports on an S-function block.

Concepts

S-Function Callback Methods

Description of S-function callback methods

S-Function SimStruct Functions

Overview of SimStruct macros and functions.

Was this topic helpful?