Is there a function that will display all the fields of a nested structure in MATLAB?
122 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2010 年 1 月 21 日
I have a nested structure, containing levels of structures within it.
I would like to be able to view all the fields of this nested structure.
採用された回答
MathWorks Support Team
2016 年 10 月 17 日
There is not a built in function in MATLAB that would display the contents of a nested structure hierarchy.
You can achieve this by writing a function that recursively navigates through each field of the structure and displays its contents.
Find attached an example file, unfold.m, which displays the contents of nested structures. The help contents of the function contain more information on its usage.
1 件のコメント
KAE
2019 年 11 月 20 日
This is useful for looking at multi-level XML files read in by xml2struct. I wish there were more XML utilities in Matlab to make it easy to extract data from many records.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!