You can apply attributes to the System object™ class and properties. To learn more about attributes, see Class Attributes or Property Attributes.
Class AttributeThis table shows attributes that you can apply to the MATLAB System object class.
Attribute Name | Description |
StrictDefaults | Control the defaults for the methods that restrict specification modifications
changes: isInputSizeMutableImpl
isInputComplexityMutableImpl
isInputDataTypeMutableImpl
isTunablePropertyDataTypeMutableImpl
isDiscreteStateDataTypeMutableImpl
By default, these methods return true . When you add this class
attribute, these methods return false by default. By making these methods return
false , the specified aspects of the inputs, tunable properties, or discrete states
cannot change. You can always implement these methods individually. Customized methods take precedence
over the StrictDefaults attribute. For System objects used in
Simulink®, this attribute only restricts input size changes because Simulink already restricts
complexity and data type for tunable properties, inputs, and states. |
Specify the class attribute value in parentheses followed by the class name, for
example:
classdef (StrictDefaults) MySystemObject < matlab.System
Property AttributesYou can apply the following attributes to any property of a custom System object.
Nontunable | Use Nontunable to prevent changes to a property
value while the object is in use. By default, all properties are tunable.
The Nontunable attribute is useful to lock down 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 . |
DiscreteState | Use DiscreteState to mark a property so it will display its state value when you
use the getDiscreteState method. |