How to select specific content in text file and read it into a matrix
1 view (last 30 days)
Show older comments
The picture below is the text file. The first column is the time information (seconds). I want to select the table where the time information = "78463.0" and read the content that has this property into a matrix. Anyone knows how to do that?

Answers (1)
Walter Roberson
on 12 Oct 2020
There is no direct way to read in only part of a table based upon content.
If you happen to know the start and end row, then you can use DetectImportOptions() and adjust the DataLines property to match.
In the case of the data you show, each group of values in the first column appears to occupy exactly 9 rows, so there is the potential to compute the rows you want.
0 Comments
See Also
Categories
Find more on Text Files 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!