If you want to work in actual floating point you'll need to convert your symbolic expression into a function. You can automate that procedure by using the confusingly-named matlabFunction:thetafun = matlabFunction(y1)使用双精度变量返回函数:which returns a function using double precision variables:thetafun =@(theta)cos(theta).*2.224607614528244e1然后可以调用匿名函数 thetafun就像任何功能,例如thetafun(0.5).The anonymous function thetafun can then be called just like any function, e.g., thetafun(0.5). 这篇关于如何在Matlab中简化符号和数字混合表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-09 15:21