could anyone help me how to display 1 as 1.0000

5 vues (au cours des 30 derniers jours)
jaah navi
jaah navi le 6 Août 2019
Commenté : Adam le 6 Août 2019
i want to display the round number with decimal value 0.
I am having number 1.I want to display it as 1.0000(adding four decimal zeros)
could anyone please help me on it.
  1 commentaire
Adam
Adam le 6 Août 2019
Display it where? On command line or on a GUI or somewhere else?
doc sprintf
should do that if you just want to view a specific instance, e.g.
x = 1;
sprintf( '%.4f', x )
but it depends entirely where you want it and for what purpose.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by