Create header for merged table columns

40 ビュー (過去 30 日間)
Nathan Jessurun
Nathan Jessurun 2019 年 4 月 29 日
コメント済み: Peter Perkins 2019 年 5 月 3 日
This should be simple, but I can't seem to find the documentation to make it happen.
I would like to make the following table in Matlab:
Capture.PNG
running
load nestedTables.mat
adds a table indicating this form of header is possible, but I don't know how they created it. Any help would be appreciated. Thanks!
TLDR: I would like three classifications in the attached file to have their own headers, but still apear as part of the same table like T1 from nestedTables.mat.
  1 件のコメント
dpb
dpb 2019 年 4 月 29 日
I've not actually used it but there are 'NewVariableName' and 'MergeAsTable' named parameters to the mergevars function which is how I presume such was created.

サインインしてコメントする。

採用された回答

Adam Danz
Adam Danz 2019 年 4 月 29 日
編集済み: Adam Danz 2019 年 4 月 29 日
This should get you started (r2018a or later)
You're basically going to create a table of tables. Check out this example from the link above.
  2 件のコメント
Nathan Jessurun
Nathan Jessurun 2019 年 4 月 29 日
That's exactly what I was looking for, I just couldn't find it. Thanks!
Peter Perkins
Peter Perkins 2019 年 5 月 3 日
Word of warning: (caveat -- I haven't loaded the mat file, only looked at the picture). As pictured, you seem to be asking for tables in tables in tables. That absolutely works fine, but the nice display of nested tables is limited to two levels deep, so it may not look like what you expect. If you are thinking of that picture as two tables side-by-side, then you're good.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by