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

조회 수: 123 (최근 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
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
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에서 Structures에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2006b

Community Treasure Hunt

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

Start Hunting!

Translated by