Accuracy small numbers converted to symbolic

1 Ansicht (letzte 30 Tage)
Martin Baumann
Martin Baumann am 4 Mai 2021
Any idea how to eliminate the inaccuracy occuring when converting small numbers to symbolic:
Current Example:
>> sym(2e-6)
ans =
4722366482869645/2361183241434822606848
>> sym(2e-5)
ans =
1/50000

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 4 Mai 2021
sym('2e-6')
ans = 
0.000002
sym(2)*10^(-6)
ans = 
  1 Kommentar
Martin Baumann
Martin Baumann am 6 Mai 2021
Thank you Walter, great idea and does the trick. Regards, Martin

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by