matlab.System
is the base class for System
objects. In your class definition file, you must subclass your object
from this base class (or from another class that derives from this
base class). Subclassing allows you to use the implementation and
service methods provided by this base class to build your object.
Type this syntax as the first line of your class definition file to
directly inherit from the matlab.System
base class,
where ObjectName
is the name of your object:
classdef ObjectName < matlab.System
Note:
You must set |
resetImpl | Reset System object states |
setupImpl | Initialize System object |
stepImpl | System output and state update equations |
In addition to the attributes available for MATLAB® objects, you can apply the following attributes to any property of a custom System object™.
Nontunable | After an object is locked (after it is called or setup has
been called), use Nontunable to prevent a user
from changing that property value. By default, all properties are
tunable. The Nontunable attribute is useful to
lock a property that has side effects when changed. This attribute
is also useful for locking a property value assumed to be constant
during processing. You should always specify properties that affect
the number of input or output ports as Nontunable . |
Logical | Use Logical to limit the property value
to a logical, scalar value. Any scalar value that can be converted
to a logical is also valid, such as 0 or 1. |
PositiveInteger | Use PositiveInteger to limit the property
value to a positive integer value. |
DiscreteState | Use DiscreteState to mark a property so
it will display its state value when you use the getDiscreteState method. |
To learn more about attributes, see Property Attributes in the MATLAB Object-Oriented Programming documentation.