Textscan to import a csv file with random amount of rows and blank rows
Show older comments
I want to import a file using textscan or any method that looks like this [ Devices 200 John Collette FRAME,SUB FRAME,1V,2V,3V,4V,5V 1,1,.343,.234,.233,3.23,.233 2,1,.348,.254,.274,3.53,.243 3,1,... &so on until
Devices' 200 John Collette FRAME,SUB FRAME,1V,2V,3V,4V,5V 1,1,.343,.234,.233,3.23,.233 2,1,.348,.254,.274,3.53,.243 &same amount of rows as 1st set ] I will be importing files in which, the amount of rows in the first set is not consistent. (so one file will have 300 rows, the next one 328,random amounts) How do I deal with the blank line that comes between the sets. Can I use it as a signifier that four lines of text are next?
1 Comment
Oleg Komarov
on 15 Mar 2011
Please post the format of the file formatting with the code button and seprating it from other text.
It's important to define the number of columns, so what happens to the line at ",... % so"?
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets 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!