About 3 significant digit?

3 次查看(过去 30 天)
Ls
Ls 2021-9-11
回答: Jan 2021-9-11
How do i present the output in 3 significant digit?

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by