MATLAB: How to name the columns of the table by the names of row 1

column names

I have inserted a table into matlab using this
pos=readtable("Pos_data.csv")
When I do this in R, the row names in row 1 become the columne names. However, in Matlab it does not do this. Please could you tell me how I name the columns based on the names in row 1 of the table ( as this is where the title of the columns are currently).
Thank-you,

Best Answer

  • Check out the ReadVariableNames property; set it to true.
    pos=readtable("Pos_data.csv",'ReadVariableNames',true)
  • Related Question