How to import rows from a tab seperated .txt file containing a specific string?

I have a large text file containing approximately 80,000 rows of tab seperated data. There are 6 columns throughout, and the first column contains a string while the remaining columns contain either a number or an X. I need to import only the rows of the file containing a specific string, "Tick", in the first column, and perform further analysis on these rows only.
Thanks in advance for any help!

回答 (1 件)

dpb
dpb 2015 年 11 月 22 日

0 投票

80k lines with current memory available isn't all that big a file...simplest is to just read the whole file into memory, delete the rows not wanted by searching on the target string then parse the rest.
A sample small representative section of the file content would make specifics far easier for someone w/ some spare time to write a few actual lines...

カテゴリ

ヘルプ センター および File Exchange で Cell Arrays についてさらに検索

タグ

質問済み:

2015 年 11 月 21 日

回答済み:

dpb
2015 年 11 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by