How to change integer format

4 Ansichten (letzte 30 Tage)
Belal Arar
Belal Arar am 29 Dez. 2016
Kommentiert: Mohammad Abouali am 29 Dez. 2016
how to make the double value format... like 02 instead of 2 ?

Akzeptierte Antwort

Mohammad Abouali
Mohammad Abouali am 29 Dez. 2016
Bearbeitet: Mohammad Abouali am 29 Dez. 2016
fprintf('%0.2d\n',2)
02
fprintf('%0.2d\n',3)
03
fprintf('%0.4d\n',3)
0003
  2 Kommentare
Belal Arar
Belal Arar am 29 Dez. 2016
thank you man :)
Mohammad Abouali
Mohammad Abouali am 29 Dez. 2016
You are welcome

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by