Set whether System object input size can change
mutable = isInputSizeMutableImpl(obj,i)
returns whether the mutable
= isInputSizeMutableImpl(obj
,i
)i
th input to the object can change size when the
object is in use.
This method is part of the matlab.System
class.
You must set Access = protected
for this method.
Restrict the size of all inputs by adding the isInputSizeMutableImpl
method and returning
false
. By adding this method, users of the System object cannot change the size of inputs while
the System object is in use.
function flag = isInputSizeMutableImpl(obj,~) flag = false; end
To avoid a warning about unused variables, this examples uses ~
as the second input argument.
For more information about using ~
in place of arguments, see Input Arguments and ~ in Method Definitions.
This example shows how to write the isInputSizeMutableImpl
method to only
restrict one input. isInputSizeMutableImpl
returns true
for all inputs
except input one.
methods (Access = protected) function flag = isInputSizeMutableImpl(obj,index) if index == 1 flag = false; else flag = true; end end end
isInputComplexityMutableImpl
| isInputDataTypeMutableImpl
| matlab.System
| processInputSpecificationChangeImpl