Determine whether input is global variable
Note isglobal will be removed in a future release. See Tips for more information.
tf = isglobal(A)
isglobal is most commonly used in conjunction with conditional global declaration. An alternate approach is to use a pair of variables, one local and one declared global.
Instead of using
if condition global x end x = some_value if isglobal(x) do_something end
You can use
global gx if condition gx = some_value else x = some_value end if condition do_something end
If no other workaround is possible, you can replace the command