Class: matlab.system.mixin.Nondirect
Package: matlab.system.mixin

Output calculation from input or internal state of System object


[y1,y2,...,yN] = outputImpl(obj,u1,u2,...,uN)


[y1,y2,...,yN] = outputImpl(obj,u1,u2,...,uN) specifies the algorithm to output the System object™ states. . The output values are calculated from the states and property values. Any inputs that you set to nondirect feedthrough are ignored during output calculation.

outputImpl is called by the output method. It is also called before the updateImpl method. For sink objects, calling updateImpl before outputImpl locks the object. For all other types of objects, calling updateImpl before outputImpl causes an error.


You must set Access = protected for this method.

You cannot modify any tunable properties in this method if its System object will be used in the Simulink® MATLAB System block.

Input Arguments


System object handle


Inputs from the algorithm. The number of inputs must match the number of inputs returned by the getNumInputs method. Nondirect feedthrough inputs are ignored during normal execution of the System object. However, for code generation, you must provide these inputs even if they are empty.

Output Arguments


Outputs calculated from the specified algorithm. The number of outputs must match the number of outputs returned by the getNumOutputs method.


expand all

Specify in your class definition file that the output does not directly depend on the current input with the outputImpl method. PreviousInput is a property of the obj.

methods (Access = protected)
   function [y] = outputImpl(obj, ~)
      y = obj.PreviousInput(end);
Was this topic helpful?