MATLAB Function Reference
  Go to function:
    Search    Help Desk 
fieldnames    Examples   See Also

Field names of a structure

Syntax

Description

names = fieldnames(s) returns a cell array of strings containing the structure field names associated with the structure s.

Examples

Given the structure:

Then the command n = fieldnames(mystr) yields

See Also

getfield    Get field of structure array

setfield    Set field of structure array



[ Previous | Help Desk | Next ]