This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Set the numeric types (real, complex, or inherited) of the signals accepted by an output port






SetOutputPortComplexSignal(s, port, csig)



Instance of Simulink.MSFcnRunTimeBlock class representing the Level-2 MATLAB S-Function block.


Integer value specifying the index of port to be set.


Integer value specifying whether the port produces real (0) or complex (1) signals.


The Simulink® engine calls this routine to set the output port numeric type for outputs that have this attribute set to COMPLEX_INHERITED. The input argument csig is the proposed numeric type for this output port. The S-function must check whether the specified numeric type is a valid type for the specified port.

If it is valid, Level-2 MATLAB S-functions set the numeric type of the specified output port using the line

s.OutputPort(port).Complexity = csig;

The S-function can also set the numeric types of other input and output ports with unknown numeric types. The engine reports an error if the S-function changes the numeric type of a port whose numeric type is known.

If the S-function does not implement this routine, the engine assumes that the S-function accepts a real or complex signal and sets the output port numeric type to the specified value.

The engine calls this method until all output ports with inherited numeric types have their numeric types specified.


See sdotproduct.c for an example of how to use this function.

Introduced in R2012b