fieldnames

fielnames(s) returns a cell array of strings with the field names of s, s being a struct object.

Examples

> s.name = {'sean';'paul'}

> s.age = [23;32]

> fieldnames(s)#

	[name]
	[age]

Resources

See also

class | rmfield | struct