acquirevar
Acquires variable value from a specified variables scope.
📝Syntax
value = acquirevar(scope, variable_name)
📥Input Arguments
Parameter Description
scope a string: 'global', 'base', 'caller', 'local'.
variable_name a string: the name of symbol to search.
📤Output Arguments
Parameter Description
value value of the variable searched.
📄Description

acquirevar search a symbol in a specific scope and copy the value in current scope.

💡Examples
 Y = 'variable in base scope';
function myfun()
  disp(acquirevar('base', 'Y')
end
myfun()
🔗See Also
assigninwho
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub