# varislock

Checks if a variable is locked.

## Syntax

* state = varislock(scope, variable\_name)

## Input argument

* scope - a string: 'global', 'base', 'caller', 'local'.
* variable\_name - a string: variable name.

## Description

**varislock** returns true if **variable\_name** has been declared as locked variable and false otherwise.

## Example

```matlab
y = 3;
varislock('local', 'y')
varlock('local', 'y')
varislock('local', 'y')
y = 4
varunlock('local', 'y')
varislock('local', 'y')
y = 4
```

## See also

[varlock](varlock), [varunlock](varunlock).

## History

| Version | Description     |
| ------- | --------------- |
| 1.0.0   | initial version |

## Author

Allan CORNET
