Main Content

resetImpl

Class: matlab.System

Reset System object states

Syntax

resetImpl(obj)

Description

resetImpl(obj) specifies the algorithm that initializes or resets the states of a System object™. Typically you reset the states to a set of initial values, which is useful for initialization at the start of simulation.

Run-Time Details

resetImpl is called by the reset method only if the object is in use. The object remains as "in-use" after it is reset. For details, see Detailed Call Sequence.

Method Authoring Tips

  • You must set Access = protected for this method.

  • If this System object will be used in the Simulink® MATLAB System (Simulink) block, you cannot modify any tunable properties in this method.

Input Arguments

expand all

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

Examples

expand all

Use the resetImpl method to reset the state of the counter stored in the Count property to zero.

methods (Access = protected)
   function resetImpl(obj)
      obj.Count = 0; 
   end
end
Introduced in R2011b