isglobal
Test whether a variable is global.
Syntax
Section titled “Syntax”tf = isglobal(A)Description
Section titled “Description”Returns true if the variable was declared with global in the current workspace. Detects whether the name shares storage with the global symbol table.
Note: globals are usually best avoided. Function arguments and explicit return values are clearer for most use cases.
Examples
Section titled “Examples”global x;x = 10;isglobal(x) % 1