evalin
Evaluate a string in a different workspace.
Syntax
Section titled “Syntax”evalin(ws, expression)[a1, a2, ...] = evalin(ws, expression)Description
Section titled “Description”Like eval but executes in the workspace named by ws — typically 'base' (the top-level interactive workspace) or 'caller' (the caller of the current function). Useful for accessing the base workspace from inside a function.
Examples
Section titled “Examples”evalin('base', 'who') % list variables in the base workspaceevalin('caller', 'x') % retrieve x from the caller