Action when tunable properties change
processTunedPropertiesImpl(obj)
processTunedPropertiesImpl(obj)
specifies the algorithm to perform
when one or more tunable property values change. This method is called as part of the next
call to the System
object™ after a tunable property value changes. A property is tunable only if its
Nontunable
attribute is false
,
which is the default.
processTunedPropertiesImpl
is called when you run the
System
object.
You must set Access = protected
for this method.
You cannot modify any tunable properties in this method if its System object will be used in the Simulink® MATLAB System block.
|
System object |
Use this method when a tunable property affects the value of a different property.
To check if a property has changed since stepImpl
was
last called, use isChangedProperty
within processTunedPropertiesImpl
. See Specify Action When Tunable Property Changes for an example.
In MATLAB® when multiple tunable properties are changed before running the System
object, processTunedPropertiesImpl
is called only
once for all the changes. isChangedProperty
returns
true
for all the changed properties.
In Simulink, when a parameter is changed in a MATLAB System block dialog, the next simulation step calls processTunedPropertiesImpl
before calling stepImpl
. All tunable parameters are considered changed and
processTunedPropertiesImpl
method is called for each
of them. isChangedProperty
returns true
for all the dialog properties.