Hello all, unfortunatly I have not found a answer to this question. I have a large object, stored as 'struct'. What I need is a quick overview over all the fields of the struct. I do not need to see the values which are stored in those fields. E.g.: The struct is
S.a=...
S.b=...
S.c=...
...
I want to have this answer:
ans = S.a, S.b, S.c
or even this:
ans = a, b, c
Thank you very much for your help !

 채택된 답변

Stephen23
Stephen23 2017년 8월 10일
편집: Stephen23 2017년 8월 10일

1 개 추천

Simply call fieldnames:
fieldnames(S)

댓글 수: 1

moritz wagner
moritz wagner 2017년 8월 11일
Sometimes you do not get the obvious.. Thank you very much, Stephen.

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Structures에 대해 자세히 알아보기

태그

질문:

2017년 8월 10일

댓글:

2017년 8월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by