- The true value option displays symbolic results in the short fixed-decimal format with 4 digits after the decimal point.
How to keep more digits when use symbolic expressions
1 次查看(过去 30 天)
显示 更早的评论
my codes is simple,
syms x
f(x)=0.123456789*x
f(1)
sympref('FloatingPointOutput', true);
f(x)=0.123456789*x
f(1)
When use sympref, it will only keep four digits, (I want to show 0.123456789). Is there any way to keep them all.
0 个评论
采纳的回答
Star Strider
2022-2-21
From the documentation on 'FloatingPointOutput' —
syms x
f(x)=0.123456789*x
f(x)=0.123456789*x
F = vpa(f,64) % Specify 64 Digits In The 'vpa' Output
.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mathematical Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!