Writing S-Functions    
ssSetInputPortComplexSignal

Set the numeric type (real or complex) of an input port.

Syntax

Arguments

S
   SimStruct representing an S-Function block or a Simulink model.

port
   Index of an input port.

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

C

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.

See Also
ssGetInputPortComplexSignal


  ssSetExternalModeFcn ssSetInputPortDataType