Azzera filtri
Azzera filtri

Fields in a Structure

13 visualizzazioni (ultimi 30 giorni)
Preetam Pal
Preetam Pal il 16 Ago 2015
Risposto: Shivam il 30 Lug 2022
How can I fetch the list of fields in a structure? Regards, Preetam

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 16 Ago 2015
Use fieldnames

Più risposte (1)

Shivam
Shivam il 30 Lug 2022
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.

Categorie

Scopri di più su Structures in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by