フィルターのクリア

How to get the 5th decimal after point value in mat lab like(0.0000456)

1 回表示 (過去 30 日間)
eswarsakhamuri
eswarsakhamuri 2016 年 1 月 24 日
コメント済み: eswarsakhamuri 2016 年 1 月 24 日
How to get the 5th decimal after point value .In result in shows only 4 decimal values like (0.0004) it can not show the 5 and more decimal values (0.0000456),it take or shows the 5th or more decimal values like (0.0000). so please how to get the 5th or more decimal in mat lab results(0.0000456).

採用された回答

Jan
Jan 2016 年 1 月 24 日
Using disp is easy and smart, but offers only a few set of formats controlled by the format command. If you want a specific output of numbers, use fprintf:
format longg
disp(pi);
format short
disp(pi);
fprintf('%12.6f\n', pi)

その他の回答 (1 件)

John D'Errico
John D'Errico 2016 年 1 月 24 日
help format
Specifically, you may want:
format long g

カテゴリ

Help Center および File ExchangeWaveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by