How to change integer format
6 views (last 30 days)
Show older comments
Belal Arar
on 29 Dec 2016
Commented: Mohammad Abouali
on 29 Dec 2016
how to make the double value format... like 02 instead of 2 ?
0 Comments
Accepted Answer
Mohammad Abouali
on 29 Dec 2016
Edited: Mohammad Abouali
on 29 Dec 2016
fprintf('%0.2d\n',2)
02
fprintf('%0.2d\n',3)
03
fprintf('%0.4d\n',3)
0003
2 Comments
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements 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!