- Read the file as text (e.g. with the readfile function)
- Remove lines you don't need
- Parse remaining lines to an array (e.g. with textscan or cellfun)
How to skip text lines in a .dat file
8 次查看(过去 30 天)
显示 更早的评论
Dear all,
I want to import a large .dat file in matlab; when I use the command "importdata" it only imports the first part of the data, it stops when the .dat file reaches a text line. So I'm wondering if there is a way to import all the data by skipping or eliminating the text lines from the .dat file.
The text lines example I'd like to eliminate/skip is shown in the immage "Zone T= "3", [...], strandid=1". There's one about every 21209 lines.
0 个评论
回答(1 个)
Rik
2020-1-30
When the automatic tools fail, it is generally the easiest to fall back to doing it yourself:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Report Generator 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!