Fields in a Structure

13 次查看(过去 30 天)
How can I fetch the list of fields in a structure? Regards, Preetam

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2015-8-16
Use fieldnames

更多回答(1 个)

Shivam
Shivam 2022-7-30
You can fetch the fields of a structure S using fieldname this way.
fields = fieldnames(S)
It returns the field names of the structure array S in a cell array.

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by