记录一下自己最近遇到的问题
在matlab自定义函数(function)中怎么引入工作区变量(使用evalin函数)
x_inner = evalin(‘base’, ‘x’);
evalin Evaluate expression in workspace.(evalin提取工作区中的变量)
evalin(WS,'expression') evaluates 'expression' in the context of the workspace WS. WS can be 'caller' or 'base'. It is similar to EVAL except that you can control which workspace the expression is evaluated in.(工作区WS也称为‘caller’或‘base’)
[X,Y,Z,...] = evalin(WS,'expression') returns output arguments from the expression.
eval函数的用法
参考:https://blog.csdn.net/sinat_32547403/article/details/53256463