isInputSizeLockedImpl

Class: matlab.System

Status of locked input size

Syntax

flag = isInputSizeLockedImpl(obj,i)

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

Description

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.

Note

You must set Access = protected for this method.

Input Arguments

obj

System object

i

System object input port number

Output Arguments

flag

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

Examples

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;
   end
end

Compatibility Considerations

expand all

Not recommended starting in R2018a