MATLAB: Importing CSV data with multiple formats in a row into MATLAB

csvMATLABmultiple format

I have to read the following PMU data into MATLAB from a CSV data file including different formats of the data.
The first two rows of my data looks like. First row is header and second row is actual data.Also i need to skip date "2014/05/26" from the first entry.
Timestamp,Test:V+:Magnitude,Test:V+:Angle,Test:I+:Magnitude,Test:I+:Angle,Eldrich2:V+:Magnitude,Eldrich2:V+:Angle,Eldrich2:I+:Magnitude,Eldrich2:I+:Angle
2014/05/26 15:27:17.140,2.4305,170.3142,0.4488,122.2368,2.9103,-129.0612,0.463,23.9783
Do you help me with a code to solve it?

Best Answer

Try sotoo of--
fid = fopen('abcd.csv','r');
fmt=['%*s %2d:%2d:%2d.%3d repmat('%f',1,9)];
C = textscan(fid, fmt,'headerlines',1','delimiter',',','collectoutput',true);
fid=fclose(fid);
NB: AIRCODE, untested, salt to suit...