MATLAB eval() 函数错误
即使使用最简单的输入,eval() 也会返回相同的错误。
>> ns=int2str(17)
>> xs=num2str(18)
>> d = eval(ns,'+',xs)
??? Index exceeds matrix dimensions.
>> eval('1/2')
??? Index exceeds matrix dimensions.
任何帮助将不胜感激。
eval() returns the same error, even with the simplest of inputs.
>> ns=int2str(17)
>> xs=num2str(18)
>> d = eval(ns,'+',xs)
??? Index exceeds matrix dimensions.
>> eval('1/2')
??? Index exceeds matrix dimensions.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先尝试
清除所有
..似乎您有一个名为eval
的变量正在隐藏该函数。try
clear all
first.. it seems you have a variable calledeval
that is shadowing the function.我认为你需要将论点放在方括号中。这是文档中显示的语法 - 请参阅
http://www.math.ufl.edu/help/matlab/ tec1.3.html 或 http:// www.mathworks.com/access/helpdesk/help/techdoc/ref/eval.html
我没有matlab,但在freemat中,
I think you need to put the argument in square brackets. That's the syntax shown in the documentation - see
http://www.math.ufl.edu/help/matlab/tec1.3.html or http://www.mathworks.com/access/helpdesk/help/techdoc/ref/eval.html
I don't have matlab, but in freemat,