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

19 ビュー (過去 30 日間)
Matthias Chung
Matthias Chung 2016 年 11 月 16 日
コメント済み: Matthias Chung 2016 年 11 月 18 日
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 Center および File ExchangeStructures についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by