Undefined function or variable 'matlabFunction'.
显示 更早的评论
Dear all,
I am trying to use 'matlabFunction' feature to convert a symbolic expression into the function. I used an example, given in a help file:
syms x y
r = sqrt(x^2 + y^2);
ht = matlabFunction(sin(r)/r, cos(r)/r)
However, what I always get, is a error message: Undefined function or variable 'matlabFunction'.
I am sure, Symbolic Math Toolbox is installed, cause in the uninstall menu all of the toolboxed as checked as available.
Any suggestions how to make it working?
Thank you in advance!
回答(2 个)
Star Strider
2017-4-3
0 个投票
If you have the Symbolic Math Toolbox from R2008a or later, you will have matlabFunction.
5 个评论
Svyatoslav Kharitonov
2017-4-3
Star Strider
2017-4-3
See if running these lines from your Command Window (or a script) solves the problem:
restoredefaultpath
rehash toolboxcache
Svyatoslav Kharitonov
2017-4-4
编辑:Svyatoslav Kharitonov
2017-4-4
Star Strider
2017-4-4
See if rebooting MATLAB solves that problem.
Svyatoslav Kharitonov
2017-4-4
Walter Roberson
2017-4-4
0 个投票
A couple of people have reported this in the past for R2016a. The solution appears to be to reinstall the Symbolic Toolbox
类别
在 帮助中心 和 File Exchange 中查找有关 Code Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!