where is the setting to page/summarize large tables?
조회 수: 13 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (2개)
John D'Errico
2025년 8월 6일
편집: John D'Errico
2025년 8월 6일
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
Walter Roberson
2025년 8월 7일
Datapoint: on Intel MacOS 15.6, isHot returns 1 at the command line. (It probably returns 0 in mlx file)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!