Many Decimals with vpa()
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Maxime Rivard
am 5 Dez. 2017
Beantwortet: Walter Roberson
am 5 Dez. 2017
I understand vpa can give my many decimals of pi, for example. But what if I want to input myself a number with many digits, say 1.282884769975957739739957395739? If I type vpa(1.2828847699759577397399573957,30), I get 1.28288476997595779494076850824, which is not the number I want. I ultimately just want to do calculations on a precise initial number.
Thanks.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 5 Dez. 2017
vpa('1.2828847699759577397399573957',30)
Better yet,
x = sym('1.2828847699759577397399573957');
vpa(x, 30)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numbers and Precision finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!