How to change integer format

조회 수: 9 (최근 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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by