title: Iterate over a Matlab table using column headings
body: <p>How can I iterate over the columns of a Matlab table? The Python equivalent and assuming data was a pandas data frame would be:</p>
  
  <pre><code>variable_names=data.keys() #get variable names
  for i in variable_names:   # iterate over and print all data using variable names
      print data[i]
  </code></pre>
  
  <p>But the corresponding for a Matlab table does not work:</p>
  
  <pre><code>f='Vilar_data.xls';
  data=readtable(f);
  variables=data.Properties.VariableNames; %get variable names
  for i=variables,
      data(1:end,{i})                      %attemt to iterate over the data by column headings
  end
  </code></pre>