Function Reference
— Built-in Function: fieldnames (struct)

Return a cell array of strings naming the elements of the structure struct. It is an error to call fieldnames with an argument that is not a structure.