isglobal

Returns a logical value indicating whether the input is global in scope.

Syntax

R = isglobal('var')

Inputs

var
Name of the variable(s) to be tested.
Type: string
Dimension: string

Outputs

R
Logical value.

Example

Global logic test:

global A
A = 2;
isglobal('A')
R = 1