isglobal
Checks if a variable is global.
📝Syntax
state = isglobal(variable_name)
📥Input Arguments
Parameter Description
variable_name a string: variable name.
📤Output Arguments
Parameter Description
state a logical: true if variable is global.
📄Description

isglobal returns true if variable_name has been declared as global variable and false otherwise.

💡Examples
y = 3;
isglobal y
global b
b = 3
isglobal b
clear global b
isglobal b
🔗See Also
clearwhoglobal
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub