MATLAB Answers

How to read single value from csv file?

40 views (last 30 days)
In the attached csv file I wnat to read data of column D and E and header of this data from cell A5.
I am able to read data of column D and E using instruction:
data=csvread('Test.csv',0,3);
But, I am not able to read the heading from cell A5.
Please help me on this.

  2 Comments

madhan ravi
madhan ravi on 12 Feb 2019
which version of matlab are you using?

Sign in to comment.

Accepted Answer

Omer Yasin Birey
Omer Yasin Birey on 12 Feb 2019
Edited: Omer Yasin Birey on 12 Feb 2019
Hi Shritesh, I don't think that you can read strings with csvread. But you can use importdata for this
values = importdata('Test.csv');
A5 = values.textdata(5);
It will save the string and doubles in a struct that you can reach them after.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Products


Release

R2014a