This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Discrete state property values


s = getDiscreteStateImpl(obj)


s = getDiscreteStateImpl(obj) returns a struct s of internal state value properties, which have the DiscreteState attribute. The field names of the struct are the object's DiscreteState property names. To restrict or change the values returned by getDiscreteState method, you can override this getDiscreteStateImpl method.

getDiscreteStatesImpl is called by the getDiscreteState method, which is called by the setup method.

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

    You cannot modify any properties in this method.

Input Arguments


System object™ handle

Output Arguments


State values, returned as a struct


expand all

Use the getDiscreteStateImpl method in your class definition file to get the discrete states of the object.

methods (Access = protected)
   function s = getDiscreteStateImpl(obj)

See Also

Was this topic helpful?