Why does NUM2STR function not honor the default format "%11.4g" in case of large numbers in MATLAB 7.0.4 (R14SP2)?
Show older comments
When I invoke NUM2STR for very large numbers it does not honor the default format which is "%11.4g". Here is the code to reproduce this issue:
x =1e20/3;
num2str(x)
This produces an output:
33333333333333332000
where as the output should be
3.33e+19
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!