How can I skip data while reading values from text file?
Show older comments
[z1, HH, TT,z2,z3,z4,z5,z6,z7,z8,z9] = textread('A.txt', '%f %f %f %f %f %f %f %f %f %f %f ' );
I am reading values from text file with this code. But before reading values, I have to delete the other parts with my hand. And I only want to read data when data's format like
899.0 997 13.2 6.2 63 6.65 170 16 295.2 314.8 296.4 this.
How can I skip the other parts in the text file which are not proper to read values?
I mean I need something like this,
if this row is not proper for my reading format, skip this row and continue to read from next row.
Accepted Answer
More Answers (0)
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!