Display double number with 6 digits exactly
5 views (last 30 days)
Show older comments
Hello,
I would like to create a string that will contain a double number. This number should be represented with 6 digits exactly.
For example:
x = 12.45;
str_x = sprintf('The number is %f\n', x);
should output 12.4500
0 Comments
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!