Writing S-Functions    
mdlOutputs

Compute the signals that this block emits.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

tid
   Task ID.

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

A, C, M

See Also

ssGetOutputPortSignal, ssGetOutputPortRealSignal, ssGetOutputPortComplexSignal


  mdlInitializeSizes mdlProcessParameters