Fields in a Structure
显示 更早的评论
How can I fetch the list of fields in a structure? Regards, Preetam
采纳的回答
更多回答(1 个)
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!