How to select specific content in text file and read it into a matrix

1 回表示 (過去 30 日間)
QIYI CAI
QIYI CAI 2020 年 10 月 11 日
回答済み: Walter Roberson 2020 年 10 月 12 日
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?
  2 件のコメント
QIYI CAI
QIYI CAI 2020 年 10 月 11 日
Here is the code i have written, what should i do next?

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 10 月 12 日
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.

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by