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
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!