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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/15 17:09:34
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.
请问这是怎么回事?

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