Matlab中输入help eval
eval(EXPRESSION) evaluates the MATLAB code in the string EXPRESSION.
[OUTPUT1,...,OUTPUTN] = eval(EXPRESSION) returns output from EXPRESSION
in the specified variables.
Example: Interactively request the name of a matrix to plot.
expression = input('Enter the name of a matrix: ','s');
if (exist(expression,'var'))
plot(eval(expression))
end
注释:eval命令是将括号中的字符串表达式当作Matlab命令来执行
例如:在Matlab中,输入a=1,跟eval('a=1')是等价的
最后
以上就是稳重电脑最近收集整理的关于Matlab中的eval命令的全部内容,更多相关Matlab中内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复