Writing S-Functions | ![]() ![]() |
Set the numeric type (real or complex) of an output port.
Syntax
Arguments
S
SimStruct representing an S-Function block or a Simulink model.
Numeric type of the signals emitted by port
. Valid values are COMPLEX_NO
(real signal), COMPLEX_YES
(complex signal), and COMPLEX_INHERITED
(dynamically determined).
Description
Use this function in mdlInitializeSizes
to initialize an input port signal type. If the numeric type of the input port is determined dynamically, e.g., by a parameter setting, set the numeric type to COMPLEX_INHERITED
. The default numeric type of an output port is real
.
Languages
Example
Assume that an S-function has three output ports. The first output port emits real (noncomplex) signals. The second input port emits a complex signal. The third port emits signals of a type determined by a parameter setting. The following example specifies the correct numeric type for each port.
ssSetOutputPortComplexSignal(S, 0, COMPLEX_NO) ssSetOutputPortComplexSignal(S, 1, COMPLEX_YES) ssSetOutputPortComplexSignal(S, 2, COMPLEX_INHERITED)
See Also
ssGetOutputPortComplexSignal
![]() | ssSetOptions | ssSetOutputPortDataType | ![]() |