About 3 significant digit?

9 visualizzazioni (ultimi 30 giorni)
Ls
Ls il 11 Set 2021
Risposto: Jan il 11 Set 2021
How do i present the output in 3 significant digit?

Risposte (1)

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

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by