Why does the table command change display format?

3 ビュー (過去 30 日間)
Snoopy
Snoopy 2023 年 4 月 28 日
コメント済み: Snoopy 2023 年 5 月 2 日
I set the display format to "short" because I want that 4 digits are shown after the decimal point, like 0.3124. I crate a "table" which should display the numbers as such. But the table shows 5 digits after the decimal point. Where am I going wrong?
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 4 月 28 日
Can you show the code?

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

採用された回答

Walter Roberson
Walter Roberson 2023 年 4 月 28 日
Where you are going wrong is in expecting table() objects to be designed to be display objects. They are not designed for display, they are designed for calculation.
table()'s disp() method has its own rules about what formats to use. It will display 4 decimal places if your current format setting is shorte
  4 件のコメント
Walter Roberson
Walter Roberson 2023 年 4 月 29 日
tables() are not designed as presentation objects. If you want a presentation object for a table, consider creating a uitable() in which you had applied round() to the numbers or in which you had pre-converted the numbers to text with the format you want. Or use the Report Generator.
Snoopy
Snoopy 2023 年 5 月 2 日
Thanks a lot for all the elaboration.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by