About 3 significant digit?

How do i present the output in 3 significant digit?

2 件のコメント

Stephen23
Stephen23 2021 年 9 月 11 日
Walter Roberson
Walter Roberson 2021 年 9 月 11 日
See also compose()

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2021 年 9 月 11 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeSystem Composer についてさらに検索

製品

質問済み:

Ls
2021 年 9 月 11 日

回答済み:

Jan
2021 年 9 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by