MATLAB: Reading a table: column name

MATLAB

I created a csv file
morning afternoon
1 0
0 2
I read it using readtable
and then type
morning
then I got
unrecognized function or variable
Please advise.

Best Answer

A column can be read from a table by referring to the the column variable.
data=readtable('filename.csv')
morning=data.morning;