Class: matlab.System

Status of locked input size

This method will be removed in a future release. Use instead isInputSizeMutableImpl.


flag = isInputSizeLockedImpl(obj,i)


flag = isInputSizeLockedImpl(obj,i) specifies whether the ith input to the System object™ cannot change its size during subsequent calls to run that object. If flag is true, the size is locked and inputs to the System object cannot change size while the object is locked. If flag is false, the input is variable size and is not locked. In the unlocked case, the size of inputs to the object can change while the object is running and locked.

isInputSizeLockedImpl executes once for each input during System object initialization.


You must set Access = protected for this method.

Input Arguments


System object


System object input port number

Output Arguments


Flag indicating whether the size of inputs to the specified port is locked, returned as a logical scalar value. If the value of isInputSizeLockedImpl is true, the size of the current input to that port is compared to the first input to that port. If the sizes do not match, an error occurs.

Default: false


expand all

Specify in your class definition file to check whether the size of the System object input is locked.

methods (Access = protected)
   function flag = isInputSizeLockedImpl(~,index)
      flag = true;

Compatibility Considerations

expand all

Not recommended starting in R2018a