where is the setting to page/summarize large tables?

74 views (last 30 days)
jessupj
jessupj on 5 Aug 2025 at 22:10
Commented: Walter Roberson on 7 Aug 2025 at 21:52
I looked but could not find where this is in the documentation. I upgraded to R2025a and now tables spool the entire contents into the command output when I just want the summary.
Surely I am not searching in the right places or with the right words, but it's driving me nuts enough to post the question.
I want the following behavior, with the middle 27M rows hidden, by default like my other instances.
>> T
ans =
27289380×3 table
ID t_sec value
_____ __________ ______
1 88171.466 12
1 88204.766 5
1 88238.066 11
1 88271.366 9
1 88304.666 15
1 88337.966 14
1 88371.266 12
1 88404.566 9
1 88437.866 5
: : :
475 228022.665 1
475 228060.165 1
475 228096.005 16
475 228133.505 13
475 228171.005 2
475 228209.745 8
475 228247.005 7
475 228279.225 8
475 228314.425 6
instead of the full output when working interactively.

Answers (2)

Meg Noah
Meg Noah on 5 Aug 2025 at 23:17
Edited: Meg Noah on 5 Aug 2025 at 23:18
Did you try (and put a ';' at the end of the line to avoid outputting the whole table to console):
summary(T)

John D'Errico
John D'Errico on 6 Aug 2025 at 11:18
Edited: John D'Errico on 6 Aug 2025 at 13:08
We don't want you to go nuts. But, I'm a little surprised, as tables do what you want already by default, using R2025a, on my computer.
T = table(randi(100,[1000,3]))
T =
1000×1 table
Var1
________________
82 64 75
91 36 90
13 100 25
92 23 13
64 66 23
10 61 36
28 39 29
55 15 93
96 3 6
97 43 60
16 19 17
98 73 84
96 38 17
:
42 36 15
40 55 38
82 35 63
32 63 100
82 80 52
79 75 100
86 13 23
51 83 40
64 3 70
96 42 7
45 74 75
7 79 43
87 37 82
Display all 1000 rows.
Note the split in the table. As I said, it worked with no problem for me. So why did it not work for you? (A great deal of anguished thought ensues behind the scenes ... Well, a little. And ok, the word anguished might be a bit of hype. Hey, I thought about it for a few seconds.)
I next noted that disp(T) dumps the entire table to the command window, whereas display does the split as you want, then giving you a link to show the entire table. This suggested I look at the version of display that applies to tabular objects. The appropriate way to look at the code in the version of display used for tables is:
type @tabular/display
I've not shown the complete function as it appears on my screen. Sorry. It has a lot of crap that you won't really care about, and will just confuse things. But in there, I see the sub-function shouldTruncate.
And in there... I see the comment:
% check to see if we're displaying somewhere where hyperlinks work,
% that the table height is higher than the 20 row threshold, and that
% we're not truncating when the table can almost fit in the command
% window. If all true, then truncate
Hmm. That suggests what I think to be the answer. If MATLAB decides it cannot generate a hyperlink to display the entire table as an option at the end, then it will not truncate the table for you. And a truncated table is exactly what you want to see.
For example, I ran the above example where I display the table on my own home computer. I did not run it in Answers MATLAB, since it works differently, and will not generate a hyperlink. The point is, MATLAB online seems to have issues with the display form you want to see.
On my computer, the test it uses is:
matlab.internal.display.isHot
ans =
logical
1
Which, as you can see, results in a value of true, when done on MY computer.
Now, you do not tell us where you are running this. But I would conjecture this is why you are having a problem, that @tabular/display has decided it cannot offer the display form you want to see.
  3 Comments
jessupj
jessupj on 7 Aug 2025 at 20:14
Hey John. Thanks for the rundown. This is a fresh install of R2025a on a linux desktop system using hte full matlab desktop environment. It default behavior is acting differently than previous installations.
matlab.internal.display.isHot
is definitelly returning a big fat zero in R2025a whereas the R2024a/b which we haven't purged yet return 1. So that explains the behavior and nature of hte problem. The generated hyperlink is presuablly the clickable "Show all bazillion rows" link generated in the command window.
What's the right way to manually set this variable systemwide for all instance of R2025a?
Walter Roberson
Walter Roberson on 7 Aug 2025 at 21:52
Datapoint: on Intel MacOS 15.6, isHot returns 1 at the command line. (It probably returns 0 in mlx file)

Sign in to comment.

Categories

Find more on Tables in Help Center and File Exchange

Products


Release

R2025a

Community Treasure Hunt

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

Start Hunting!