Documentation

stepImpl

Class: matlab.System
Package: matlab

System output and state update equations

Syntax

[output1,output2,...] = stepImpl(obj,input1,input2,...)

Description

[output1,output2,...] = stepImpl(obj,input1,input2,...) defines the algorithm to execute when you call the step method on the specified object obj. The step method calculates the outputs and updates the object's state values using the inputs, properties, and state update equations.

stepImpl is called by the step method.

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

Tips

The number of input arguments and output arguments must match the values returned by the getNumInputsImpl and getNumOutputsImpl methods, respectively

Input Arguments

obj

System object™ handle

input1,input2,...

Inputs to the step method

Output Arguments

output

Output returned from the step method.

Examples

expand all

Specify System Object Algorithm

Use the stepImpl method to increment two numbers.

methods (Access = protected)
   function [y1,y2] = stepImpl(obj,x1,x2)
      y1 = x1 + 1;
      y2 = x2 + 1;
    end
end
Was this topic helpful?