matlab.System.isDiscreteStateSpecificationMutableImpl - Control whether discrete states can change data type - MATLAB (original) (raw)
Main Content
Class: matlab.System
Control whether discrete states can change data type
Syntax
mutable = isDiscreteStateSpecificationMutableImpl(obj)
Description
[mutable](#d126e2108261) = isDiscreteStateSpecificationMutableImpl([obj](#mw%5F99e9dd7d-8632-47c3-a2d4-1fb26cb9617c%5Fsep%5Fmw%5F353aa417-3412-46f8-81f1-586adf7da5a8))
returns whether discrete states can change data type when the object is in use. If this method returns false
, the discrete state must maintain the same data type while the object is in use.
The isDiscreteStateSpecificationMutableImpl
method has no effect on the MATLAB System block. Discrete state specification is always immutable in the MATLAB System block.
Method Authoring Tips
You must set Access = protected
for this method.
Input Arguments
System object handle used to access properties, states, and methods specific to the object. If your isDiscreteStateSpecificationMutableImpl
method does not use the object, you can replace this input with ~
.
Output Arguments
If you do not implement this method, discrete states can change data type unless the [StrictDefaults](matlab.system-class.html#mw%5F38d92dea-d023-409a-a98e-fe89be5cceef)
class attribute is set. If you implement this method, returning true
means discrete state data type can change and false
means they cannot change.
Examples
Restrict changes to the data type of discrete states by adding the isDiscreteStateSpecificationMutableImpl
method and returning false
. By adding this method, users of the System object cannot change the data type of discrete states while the System object is in use.
function flag = isDiscreteStateSpecificationMutableImpl(obj) flag = false; end
Version History
Introduced in R2018a