Writing S-Functions | ![]() ![]() |
Compute the signals that this block emits.
Syntax
void mdlOutputs(SimStruct *S, int_T tid)
Arguments
S
Simstruct representing an S-function block.
Description
Simulink invokes this required method at each simulation time step. The method should compute the S-function's outputs at the current time step and store the results in the S-function's output signal arrays.
The tid
(task ID) argument specifies the task running when the mdlOutputs
routine is invoked. You can use this argument in the mdlOutports
routine of a multirate S-Function block to encapsulate task-specific blocks of code (see Multirate S-Function Blocks).
For an example of an mdlOutputs
routine that works with multiple input and output ports, see matlabroot
/simulink/src/sfun_multiport.c.
Languages
See Also
ssGetOutputPortSignal
, ssGetOutputPortRealSignals, ssGetOutputPortComplexSignal
![]() | mdlInitializeSizes | mdlProcessParameters | ![]() |