Variables Window - Table / TimeTable Wrap, no horizontal scroll Option?
3 次查看(过去 30 天)
显示 更早的评论
As you can see from a screen shot below, if you make a time table (or table) that has a high number of rows and columbs and open that table in the variales window it is very difficult to read due to Matlab wrapping the columbs.
I havn't been able to find anywhere in the settings where I can enable/disable this wapping feature from happening, where when disabled there the variables window would show a horizontal scroll when a table was opened with more columbs that could be displayed in the window.
Just imagine for a min if you had a table with 100+ columbs, and 1000+ rows, that would be near imposible to read using Matlab's built in variables window, you would need to save it off to view it in excel. This doesn't seem very friendly for debugging.
A second note, I found that the tables will only show a limited number of rows. In this example the variables window only goes up to the 54th row. Is there a way to view a table in the matlab variables window, and be able to scrow down through all the rows. The only way I can think to see what is in the table visually is by creating a new table with only 54 user selected rows (doesn't seem very clean).
If there is any existing features that would adress some of these issues which I am missing, please let me know.
2 个评论
Rahul
2024-10-3
Hi @Cody Brown, I'm unable to replicate this issue on R2023b, can you provide your timetable data and the Operating System you are using? That'll help in better understanding the issue.
采纳的回答
Cris LaPierre
2024-10-3
编辑:Cris LaPierre
2024-10-3
This only happens if you use empty strings. My recommendation would be to follow the same approach as you are using with your numeric variables. You aren't adding them as empty vectors. Instead, you are using the standard missing value for the datatype, NaN. I would suggest doing the same thing for your string data types. See missing
%table's time columb:
startTime = datetime('now');
endTime = startTime + days(1);
dt = minutes(1);
time = transpose(startTime:dt:endTime);
TblLength = length(time);
%table's other columbs:
One = NaN(TblLength,1);
Tue = NaN(TblLength,1);
Three = NaN(TblLength,1);
Four = NaN(TblLength,1);
Five = NaN(TblLength,1);
Six = NaN(TblLength,1);
Seven = NaN(TblLength,1);
Eight = NaN(TblLength,1);
Nine = NaN(TblLength,1);
Ten = NaN(TblLength,1);
Eleven = NaN(TblLength,1);
Twelve = NaN(TblLength,1);
Thirteen = strings(TblLength,1);
Thirteen(:) = missing;
Fourteen = strings(TblLength,1);
Fourteen(:) = missing;
%create timetable:
T = timetable(time,One,Tue,Three,Four,Five,Six,Seven,Eight,Nine,Ten,...
Eleven,Twelve,Thirteen,Fourteen)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!