How to change integer format

4 vues (au cours des 30 derniers jours)
Belal Arar
Belal Arar le 29 Déc 2016
Commenté : Mohammad Abouali le 29 Déc 2016
how to make the double value format... like 02 instead of 2 ?

Réponse acceptée

Mohammad Abouali
Mohammad Abouali le 29 Déc 2016
Modifié(e) : Mohammad Abouali le 29 Déc 2016
fprintf('%0.2d\n',2)
02
fprintf('%0.2d\n',3)
03
fprintf('%0.4d\n',3)
0003
  2 commentaires
Belal Arar
Belal Arar le 29 Déc 2016
thank you man :)
Mohammad Abouali
Mohammad Abouali le 29 Déc 2016
You are welcome

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by