MATLAB Function Reference | Search  Help Desk |
evalin | See Also |
Evaluate expression in workspace
evalin(ws,'expression
') [X,Y,Z,...} = evalin(ws,'expression
') evalin(ws,'try
','catch
')
evalin(ws,'expression
')
evaluates expression
in the context of the workspace ws
. ws
can be either 'caller'
or 'base'
.
[X,Y,Z,...} = evalin(ws,'expression
')
returns output arguments from the expression.
evalin(ws,'try
','catch
')
tries to evaluate the try
expression and if that fails it evaluates the catch
expression in the specified workspace.
evalin
is useful for getting values from another workspace while assignin
is useful for depositing values into another workspace.
evalin
may not be used recursively to evaluate an expression, i.e., a sequence of the form evalin('caller','evalin(''caller'',''
expression
'')')
doesn't work.
assignin
Assign variable in workspace.
eval
Interpret strings containing MATLAB expressions