Remove rows in a csv file
Show older comments
Hello,
Like many others, I have csv file where the first rows (in my case 10 rows) containing text (or are empty), and hence I haven't find a way to figure how to import the file. I have tested other solutions, like (<http://www.mathworks.com/matlabcentral/answers/22710-help-removing-columns-from-csv-file)>, but that didn't solve the problem. When open the csv file in Excel, the beginning looks like this: (It looks very fuzzy, sorry for that).
Model,"WE7000" BlockNumber,"1" TraceName,"CH3","CH4", BlockSize,288154,288154, Date,08/11/25,08/11/25, Time,10:07:43,10:07:43, VUnit,V,V, HResolution,5.000000e-006,5.000000e-006,
block0 -4.999995E+000,-3.230750E+002,-3.685000E+001 -4.999990E+000,-3.230750E+002,-3.685000E+001 -4.999985E+000,3.104250E+002,-3.677500E+002 -4.999980E+000,3.104250E+002,-3.677500E+002 -4.999975E+000,-8.191750E+002,-8.189500E+002
Accepted Answer
More Answers (1)
Michael Haderlein
on 28 Aug 2014
0 votes
Without line breaks, it's a bit tricky to see how the file is formatted. However, all the text file reading functions have kind of a headerlines functionality (range for dlmread). You can just skip the first 10 rows with that. If you need help to apply such headerlines, please attach a sample file. It makes things easier usually ;-)
Categories
Find more on MATLAB Report Generator 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!