Import data from CSV file problem
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone,
I have a small job related problem that I want to discuss. My task is to read several CSV files using matlab and compile the information in an excel sheet. I already have a piece of code that I am supposed to improve on but I have a slight problem. The raw CSV files that I am supposed to compile have a line of text in every 100 lines of data but the command importdata that I have used only reads upto a 100 lines of data (i.e. all data before the first line of text appears) and moves on to the next file without reading the rest of the data in the file. I am fairly new to importing data in matlab and would appreciate any kind of help.
Thanking you in advance.
2 Kommentare
Fangjun Jiang
am 16 Aug. 2011
I guess Oleg's intent is that if those text lines always start with something common such as // or ** or any other keyword, you can use dlmread() with the 'commentstyle' option to ignore them.
Antworten (1)
the cyclist
am 16 Aug. 2011
I like to use the readtext() command from the FEX for importing mixed text/numeric files:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!