About 3 significant digit?

3 vues (au cours des 30 derniers jours)
Ls
Ls le 11 Sep 2021
Réponse apportée : Jan le 11 Sep 2021
How do i present the output in 3 significant digit?
  2 commentaires
Stephen23
Stephen23 le 11 Sep 2021
Walter Roberson
Walter Roberson le 11 Sep 2021
See also compose()

Connectez-vous pour commenter.

Réponses (1)

Jan
Jan le 11 Sep 2021
fprintf('%.3g\n', pi)
3.14
fprintf('%.3g\n', pi * 1e6)
3.14e+06
fprintf('%.3g\n', pi * 1e-6)
3.14e-06

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by