I have a csv file which looks like the following when I open it in notebook...
val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,val11,val12,val13,result 63,1,1,145,233,1,2,150,0,2.33,0,6,F
67,1,4,160,286,0,2,108,1,1.5,2,3,3,T
67,1,4,120,229,0,2,129,1,2.6,2,2,7,T
37,1,3,130,250,0,0,187,0,3.5,3,0,3,F
I would like to read this data into matlab and have found this question that really looks promising. My code for this implementation is follows...
fid = fopen(path);
out = textscan(fid,'%f%f%f%f%f%f%f%f%f%f%f%f%f','HeaderLines',1,'delimiter',',','CollectOutput',1);
fclose(fid);
However, this only seems to read in the first line into matlab. How can I get it to read in the whole file?
out{1}
ans =
63.0000 1.0000 1.0000 145.0000 233.0000 1.0000 2.0000 150.0000 0 2.3000 3.0000 0 6.0000