Writing S-Functions Previous page   Next Page
mdlOutputs

Compute the signals that this block emits

Syntax

Arguments

S
   SimStruct representing an S-Function block.

tid
   Task ID.

M Syntax

M Arguments

s
   Instance of Simulink.MSFcnRunTimeBlock class representing the 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

A, C, C++, M

See Also

ssGetOutputPortSignal, ssGetOutputPortRealSignal, ssGetOutputPortComplexSignal


Previous page  mdlInitializeSizes mdlProcessParameters Next page

© 1994-2005 The MathWorks, Inc.