Why does the table command change display format?

1 view (last 30 days)
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?

Accepted Answer

Walter Roberson
Walter Roberson on 28 Apr 2023
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

Sign in to comment.

More Answers (0)


Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!