Writing S-Functions | ![]() ![]() |
Set the numeric type (real, complex, or inherited) of ports whose numeric type cannot be determined from block connectivity.
Syntax
void mdlSetDefaultPortComplexSignals(SimStruct *S)
Arguments
S
Simstruct representing an S-function block.
Description
Simulink invokes this method if the block has ports whose numeric type cannot be determined from connectivity. (This usually happens when the block is unconnected or is part of a feedback loop.) This method must set the data type of all ports whose data type is not set.
If the block does not implement this method and Simulink cannot determine the data types of any of its ports, Simulink sets the data types of all the ports to double
. If the block does not implement this method and Simulink cannot determine the data types of some, but not all, of its ports, Simulink sets the unknown ports to the data type of the port whose data type has the largest size.
Languages
See Also
ssSetOutputPortDataType, ssSetInputPortDataType
![]() | mdlRTW | mdlSetDefaultPortDataTypes | ![]() |