isLocked - Determine if System object is in use - MATLAB (original) (raw)

Main Content

Determine if System object is in use

Syntax

Description

[tf](#bvleq1v-1-tf) = isLocked([obj](#bvleq1v-1-obj)) returns logical 1 (true) if the System object is in use. Otherwise, isLocked returns logical0 (false).

The object performs an internal initialization the first time that you call the object. After initialization, the object is considered in-use and you cannot change nontunable properties and other specifications determined by the System object author. While an object is in use, isLocked returns 1 (true). To allow changes to the object, call release.

example

Examples

collapse all

Check If Object Is Being Used

Create a Counter object and set a property.

obj = Counter; obj.UseIncrement = false

obj = Counter with properties:

UseIncrement: false
UseWrapValue: true
  StartValue: 1
   Increment: 1
   WrapValue: 10

Call the object.

Check if the object is in use.

Release the object and check if the object is still locked.

Input Arguments

collapse all

obj — System object™ to query

System object

System object whose status you want to query.

Output Arguments

collapse all

tf — True or false

0 | 1

True or false result, returned as logical 1 or0 indicating the status of the System object as in use (locked) or not.

Extended Capabilities

C/C++ Code Generation

Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2010a