MATLAB Answers

reading a table: column name

9 views (last 30 days)
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.

  6 Comments

Show 3 older comments
madhan ravi
madhan ravi on 11 Jun 2020
Post it as an answer
madhan ravi
madhan ravi on 11 Jun 2020
Answer this question

Sign in to comment.

Accepted Answer

Suraj Sudheer Menon
Suraj Sudheer Menon on 14 Jun 2020
A column can be read from a table by referring to the the column variable.
data=readtable('filename.csv')
morning=data.morning;

  0 Comments

Sign in to comment.

More Answers (0)

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by