matlab函数表达中的@是怎么使用的?>> f=@(x)(log(x)-x)f=@(x)(log(x)-x)|Error:"identifier" expected,"(" found.请问这是怎么回事?

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 00:36:06
matlab函数表达中的@是怎么使用的?>> f=@(x)(log(x)-x)f=@(x)(log(x)-x)|Error:

matlab函数表达中的@是怎么使用的?>> f=@(x)(log(x)-x)f=@(x)(log(x)-x)|Error:"identifier" expected,"(" found.请问这是怎么回事?
matlab函数表达中的@是怎么使用的?
>> f=@(x)(log(x)-x)
f=@(x)(log(x)-x)
|
Error:"identifier" expected,"(" found.
请问这是怎么回事?

matlab函数表达中的@是怎么使用的?>> f=@(x)(log(x)-x)f=@(x)(log(x)-x)|Error:"identifier" expected,"(" found.请问这是怎么回事?
matlab6.x不支持匿名函数,请使用其他方法替代或更新matalb的版本.
临时解决方案:f=inline('log(x)-x');