display numbers in 'format long'

8 vues (au cours des 30 derniers jours)
mohammad
mohammad le 17 Sep 2011
While using of 'sprintf', numbers not display in 'format long' form. for example:
sprintf('%d',0.987654345698)
ans =
9.876543e-001
how can it be shown in 'format long' form?

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 17 Sep 2011
sprintf('%30.10f',pi*1e5)
doc sprintf for more details.
  1 commentaire
mohammad
mohammad le 17 Sep 2011
Thanks a lot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB 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