Quantcast

Documentation Center

  • Trial Software
  • Product Updates

getNumOutputsImpl

Class: matlab.System
Package: matlab

Number of outputs returned by step method

Syntax

num = getNumOutputsImpl (obj)

Description

num = getNumOutputsImpl (obj) returns the number of outputs from the step method. The default implementation returns 1 output. To specify a value other than 1, you must use include the getNumOutputsImpl method in your class definition file.

getNumOutputsImpl is called by the getNumOutputs method, if the number of outputs has not been determined already.

    Note:   You must set Access=protected for this method.

    You cannot modify any properties in this method.

Input Arguments

obj

System object™ handle

Output Arguments

num

Number of outputs to be returned by the step method for the specified object.

Examples

expand all

Set Number of Outputs

Specify the number of outputs (2, in this case) returned from the step method.

methods (Access=protected)
   function num = getNumOutputsImpl(obj)
      num = 2;
   end
end

Set Number of Outputs to Zero

Specify that the step method does not return any outputs.

methods (Access=protected)
   function num = getNumOutputsImpl(~)
      num = 0;
   end
end

See Also

| |

How To

Was this topic helpful?