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 についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by