How to read data as well as string headerlines?
Show older comments
Hi everyone, I have a file containing string and numbers like this
ID height weight score
a 160 80 66
b 165 85 80
c 170 90 67
d 168 61 95
when I tried to read it into matlab, I used
[id,h,w,s]=textread('file','%s %f %f %f','headerlines',1)
which gave 4 vectors and omitted the headerline. I want the headerline also to be read into a vector, anyone knows how to do this?
Thank you, best!
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!