Import data from CSV file problem
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Fangjun Jiang
2011-8-16
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.
回答(1 个)
the cyclist
2011-8-16
I like to use the readtext() command from the FEX for importing mixed text/numeric files:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!