How to access specific rows (or columns) of a file data without loading all data?

조회 수: 10 (최근 30일)
I try to find a good way in accessing specific rows (or columns) in a large data file (either .csv, .mat, or .txt file) without loading the entire data (e.g., data are double). Using matfile allows me just to access blocks or equally spaced intervals and I cannot figure out how to do this with datastore. Would be great if anyone knows a solution. Thanks.

답변 (1개)

Alexandra Harkai
Alexandra Harkai 2016년 11월 16일
If you're using a .mat file and 'rows (or columns)' refer to an array stored in that file, then the doc helps: load-parts-of-variables-from-mat-files
  댓글 수: 5
Alexandra Harkai
Alexandra Harkai 2016년 11월 17일
Fair enough. The Doc also specifies the indices need to be equally spaced. Is there a chance you can maybe loop through the indices?
Matthias Chung
Matthias Chung 2016년 11월 18일
That would be a solution. However, it would access the file many times and for big files that is prohibitive.

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

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by