Borrar filtros
Borrar filtros

Fields in a Structure

13 visualizaciones (últimos 30 días)
Preetam Pal
Preetam Pal el 16 de Ag. de 2015
Respondida: Shivam el 30 de Jul. de 2022
How can I fetch the list of fields in a structure? Regards, Preetam

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 16 de Ag. de 2015
Use fieldnames

Más respuestas (1)

Shivam
Shivam el 30 de Jul. de 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.

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by