Importing issues with textscan

I'm importing a .txt file, consisting of 4 columns (I'm only using 3) and over 400,000 rows, using textscan (script generated from the import tool). The initial import completes successfully however, there is an issue at around the same point during each import. At approximately row 168550 the importer seems to stumble and can't read the columns correctly, producing one seemingly random number and two NaN values - for the three columns. The following row returns to the correct data. I've double checked the raw data and it does have proper values. I've also noticed some inconsistencies between the raw data and a few of the values (for obvious reasons, I haven't checked them all).
Is there a better tool for importing the data? Can I slow down the import to prevent errors? Can it be checked - like a checksum?
Thanks in advance for any insight you can provide.

댓글 수: 1

Walter Roberson
Walter Roberson 2016년 11월 7일
Would it be possible to attach the file?
If you take a copy of the file and crop out the first 150000 or so lines, does the problem stay with the line or does it stay with the relative position 168550 ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

질문:

2016년 11월 7일

댓글:

2016년 11월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by