Is there a function that will display all the fields of a nested structure in MATLAB?

156 次查看(过去 30 天)
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
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
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 CenterFile Exchange 中查找有关 Structured Data and XML Documents 的更多信息

标签

尚未输入任何标签。

产品


版本

R2006b

Community Treasure Hunt

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

Start Hunting!

Translated by