To get the field names (i.e., column names) of a structure in MATLAB, you can use the fields
function. Here's an example:
main.m119 chars7 lines
This will output:
main.m24 chars2 lines
So the fields
function returns a cell array of strings, where each string is the name of a field (i.e., column name) in the structure.
gistlibby LogSnag