- 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
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
zongxian
le 21 Fév 2022
Réponse apportée : Star Strider
le 21 Fév 2022
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 commentaires
Réponse acceptée
Star Strider
le 21 Fév 2022
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Numbers and Precision dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

