Fields in a Structure
13 次查看(过去 30 天)
显示 更早的评论
How can I fetch the list of fields in a structure? Regards, Preetam
0 个评论
采纳的回答
更多回答(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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!