read from a text file
1 回表示 (過去 30 日間)
古いコメントを表示
Hi I have a very big text file containing a huge amount of data, I like to break it down to small parts and read each part separately in order to avoid the 'out of memory' error. is there any idea how to read the data?
0 件のコメント
採用された回答
その他の回答 (2 件)
bahare
2012 年 1 月 17 日
1 件のコメント
Sven Schoeberichts
2012 年 1 月 17 日
C = textscan(fid, 'format', N) reads data from the file, using the format N times, where N is a positive integer. To read additional data from the file after N cycles, call textscan again using the original fid.
So it reads N lines. If you run the function again, it takes off where it ended, so you can use a loop to run through your data.
参考
カテゴリ
Help Center および File Exchange で Data Import and Export についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!