Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isLocked

Determine if System object is locked

Syntax

tf = isLocked(obj)

Description

example

tf = isLocked(obj) returns logical 1 (true) if the input attributes and nontunable properties for the object are locked. Otherwise, isLocked return logical 0 (false).

The object performs an internal initialization the first time that you call the object. This initialization locks nontunable properties and input specifications, such as the dimensions, complexity, and data type of the input data. After locking, isLocked returns 1 (true). Calling release unlocks the object.

Examples

collapse all

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.

step(obj,1)
ans =

     2

Check if the object is locked

isLocked(obj)
ans =

  logical

   1

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

reset(obj)
release(obj)
isLocked(obj)
ans =

  logical

   0

Input Arguments

collapse all

System object whose locked status you want to query.

Output Arguments

collapse all

True or false result, returned as logical 1 or 0 indicating the locked status of the System object.

Extended Capabilities

Introduced in R2010a

Was this topic helpful?