How to change integer format

10 ビュー (過去 30 日間)
Belal Arar
Belal Arar 2016 年 12 月 29 日
コメント済み: Mohammad Abouali 2016 年 12 月 29 日
how to make the double value format... like 02 instead of 2 ?

採用された回答

Mohammad Abouali
Mohammad Abouali 2016 年 12 月 29 日
編集済み: Mohammad Abouali 2016 年 12 月 29 日
fprintf('%0.2d\n',2)
02
fprintf('%0.2d\n',3)
03
fprintf('%0.4d\n',3)
0003
  2 件のコメント
Belal Arar
Belal Arar 2016 年 12 月 29 日
thank you man :)
Mohammad Abouali
Mohammad Abouali 2016 年 12 月 29 日
You are welcome

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by