Writing S-Functions | ![]() ![]() |
Set the numeric type (real or complex) of an input port.
Syntax
Arguments
S
SimStruct representing an S-Function block or a Simulink model.
Numeric type of the signals accepted by port
. Valid values are COMPLEX_NO
(real signal), COMPLEX_YES
(complex signal), and COMPLEX_INHERITED
(numeric type inherited from driving block).
Description
Use this function in mdlInitializeSizes
to initialize input port signal type. If the numeric type of the input port is inherited from the block to which it is connected, set the numeric type to COMPLEX_INHERITED
. The default numeric type of an input port is real
.
Languages
Example
Assume that an S-function has three input ports. The first input port accepts real (noncomplex) signals. The second input port accepts complex signals. The third port accepts signals of either type. The following example specifies the correct numeric type for each port.
ssSetInputPortComplexSignal(S, 0, COMPLEX_NO) ssSetInputPortComplexSignal(S, 1, COMPLEX_YES) ssSetInputPortComplexSignal(S, 2, COMPLEX_INHERITED)
See Also
ssGetInputPortComplexSignal
![]() | ssSetExternalModeFcn | ssSetInputPortDataType | ![]() |