Skip records in a text file

I am working with large text files (~27 GB per file) containing 570,000 rows (records). I want to locate and access the contents of a particular row as efficiently as possible. The rows all consist of an initial 21 character identifying string, followed by a blank, followed by 8386 "%f" fields separated by blanks, and then ending with a new-line. I know the record number (and identifying string) of the record I would like to read. Unfortunately, I cannot use fseek to position the file since the number of bytes per record is not constant since the "%f" fields have varying sizes.
Is there a capability in MATLAB of skipping N rows (records) of text on read in MATLAB?
Many thanks,
Duane

답변 (1개)

per isakson
per isakson 2014년 9월 30일

0 개 추천

"Is there a capability in MATLAB of skipping N rows"
The only one I can think of is the Headerlines of textscan

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

질문:

2014년 9월 30일

답변:

2014년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by