How can I specify the number of significant digits in an output variable
46 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a number, say 170803134921, in a character array. When I convert the array to a number it shows up with scientific notation.
temp = '170803134921'
str2num(temp)
ans = 1.708031349210000e+11
I would like to the number that is output in ans to display the same number of significant digits as the string did (12 digits) without the decimal point and scientific notation. How do I achieve this?
0 Kommentare
Antworten (2)
Siehe auch
Kategorien
Mehr zu Logical 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!