Main Content

isOutputComplexImpl

Complexity of output ports

Syntax

[cp_1,cp_2,...,cp_n] = isOutputComplexImpl(obj)

Description

[cp_1,cp_2,...,cp_n] = isOutputComplexImpl(obj) returns whether each output port has complex data. The number of outputs must match the value returned from the getNumOutputs method or the number of output arguments listed in the stepImpl method.

For System objects with one input and one output and where you want the input and output complexities to be the same, you do not need to implement this method. In this case isOutputComplexImpl assumes the input and output complexities are the same and returns the complexity of the input.

If your System object™ has more than one input or output or you need the output and input complexities to be different, you must implement the isOutputComplexImpl method to define the output complexity. You also must use the propagatedInputComplexity method if the output complexity differs from the input complexity.

Run-Time Details

During Simulink® model compilation and propagation, the MATLAB System block calls the isOutputComplex method, which then calls the isOutputComplexImpl method to determine the output complexity.

Method Authoring Tips

  • You must set Access = protected for this method.

  • You cannot modify any properties in this method.

Input Arguments

expand all

System object handle used to access properties, states, and methods specific to the object. If your isOutputComplexImpl method does not use the object, you can replace this input with ~.

Output Arguments

expand all

Logical, scalar value indicating whether the specific output port is complex (true) or real (false).

Examples

expand all

Specify in your class definition file that the output from a System object is a real value.

methods (Access = protected)
   function c1 = isOutputComplexImpl(obj)
       c1 = false;
   end
end

Version History

Introduced in R2013b