How to remove intermittent headers from data

5 views (last 30 days)
I have a large .txt file (77,000 rows) with intermittent headers in the data (see attached picture). I'm trying to get all the numeric data into a mx3 matrix. "importdata" works great until it encounters the first intermittent head, and then it stops.
This is what I have been trying, but like I said, it stop once it reaches the first buried header
filename = 'test1.txt';
[B,delimeterOut,headerlinesOut] = importdata(filename);
Load_Time = B.data(:,1);
Load_Displacement = B.data(:,2);
Load_Force = B.data(:,3);
  3 Comments
per isakson
per isakson on 5 Aug 2018
Edited: per isakson on 5 Aug 2018
"(see attached picture)" Nothing attached. You need to both [Choose File] and [Insert Image].

Sign in to comment.

Answers (0)

Categories

Find more on Data Type Conversion 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!