| Writing S-Functions | ![]() |
Set the numeric types (real, complex, or inherited) of the signals accepted by an output port
C Syntax
C Arguments
S
SimStruct representing an S-Function block.
M Syntax
M Arguments
s
Instance of Simulink.MSFcnRunTimeBlock class representing the S-Function block.
port
Integer value specifying index of port to be set.
typeId
Integer value specifying whether the port produces real (0) or complex (1) signals.
Description
Simulink calls this routine to set the output port signal type. The S-function must check whether the specified signal type is a valid type for the specified port. If it is valid, the S-function must set the signal type of the specified output port. Otherwise, it must report an error, using ssSetErrorStatus. The S-function can also set the signal types of other input and output ports with unknown signal types. Simulink reports an error if the S-function changes the signal type of a port whose signal type is known.
If the S-function does not implement this routine, Simulink assumes that the S-function accepts a real or complex signal and sets the output port signal type to the specified value.
Languages
See Also
ssSetOutputPortComplexSignal, ssSetErrorStatus
| mdlSetInputPortWidth | mdlSetOutputPortDataType | ![]() |
© 1994-2005 The MathWorks, Inc.