Unable to convert 'sym' value to 'double'. after using solve
1 次查看(过去 30 天)
显示 更早的评论
syms DELTA_2 DELTA_CR tcr;
assume(2>tcr>0); tcr=sqrt((4*H)/(OMEGA*Pm))*(DELTA_CR - DELTA_0);
if M==Z fprintf('%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f \n' ,T, DELTA_0deg, OMEGA, DELTA_1deg, solxdeg, DELTA_3deg, solydeg, tcr) end
-----
Error using fprintf
Unable to convert 'sym' value to 'double'.
---
error for tcr
0 个评论
回答(1 个)
gonzalo Mier
2018-10-10
I have not much info with this... but, I guess tcr = constant * (DELTA_CR - constant). That means tcr doesn't have a double value because it depends on DELTA_CR. Try to print tcr before fprintf, and if is not that, give more info please
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numbers and Precision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!