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!