reading a table: column name

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 个评论

a =readtable('test.csv')
morning = a.morning
Isn’t that correct?
Yes this is the correct one.
Post it as an answer
Answer this question

请先登录,再进行评论。

 采纳的回答

0 个投票

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

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

标签

Community Treasure Hunt

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

Start Hunting!

Translated by