Textscan to choose the specific text
Show older comments
Hello, I have the following .csv file and I want to read only -0.192 and -0.168 from the third and the fourth line and ignore rest:
"Record Length",1000000,"Points"
"Trigger Time",0,s
,,,-9.99988E-06,-0.192
,,,-9.99986E-06,-0.168
I am using the following code to remove the header in the first two lines:
fid = fopen('wave00000001.csv','r');
datacell = textscan(fid, '%f64', 'HeaderLines', 2);
prbs = cell2mat(datacell);
fclose(fid);
How can I remove the ,,,-9.99E-06 values from the 3rd and the 4th line.
Thanks and Cheers, Ahmad
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Export 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!