Making Tables with Subcategories

I am trying to make a table with subcategories and cannot find it in the documentation. So all of these variables shown are structs identical to this:
[TestDurs.FE{1},TestDurs.VE{1},TestDurs.C{1}] = FE_VE_Breakdown(TestDursBL,GroupNumber);
[TestDurs.FE{2},TestDurs.VE{2},TestDurs.C{2}] = FE_VE_Breakdown(TestDursMID,GroupNumber);
[TestDurs.FE{3},TestDurs.VE{3},TestDurs.C{3}] = FE_VE_Breakdown(TestDursEOT,GroupNumber);
each struct has 3 subcategories consisting of a vector with 3 components. I was wondering if there is a way to show the subcategories under each overarching variable in the command window rather than the {1x1 struct} line.
T = table(TestDurs,VelAvg,MvmtTim,DwellTim,DwellSeg,Error,Lifts)
Capture_of_Table.PNG

댓글 수: 1

Guillaume
Guillaume 2019년 7월 8일
It's not really clear what you call a category or subcategory. structures don't have categories. perhaps, you mean fields.

댓글을 달려면 로그인하십시오.

답변 (1개)

Ryan Cole
Ryan Cole 2019년 7월 8일

1 개 추천

I have found it out, you need to make a Table of Tables. So make a table of each struct with its own variable names and column vector. Then compile those tables into one larger table. (Cant show my table because it contains private medical patient data).

댓글 수: 2

Peter Perkins
Peter Perkins 2019년 7월 8일
Ryan, you are correct, maybe. If you really have only one row in your table, you may be better off making a scalar struct of scalar structs. And if you are making a table of tables only to get nicely-formatted output, you may eventually end up disappointed. The display of a table is sometimes not "pretty" enough for reports.
Stefanos Charkoutsis
Stefanos Charkoutsis 2023년 2월 3일
Thank you so much, this actually helped a lot.

댓글을 달려면 로그인하십시오.

카테고리

제품

릴리스

R2018a

태그

질문:

2019년 7월 8일

댓글:

2023년 2월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by