How to access specific rows (or columns) of a file data without loading all data?
Afficher commentaires plus anciens
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.
Réponses (1)
Alexandra Harkai
le 16 Nov 2016
0 votes
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 commentaires
Matthias Chung
le 16 Nov 2016
Alexandra Harkai
le 17 Nov 2016
In what sense does the last example not work? Does it not assign values to subA?
Matthias Chung
le 17 Nov 2016
Modifié(e) : Matthias Chung
le 17 Nov 2016
Alexandra Harkai
le 17 Nov 2016
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
le 18 Nov 2016
Catégories
En savoir plus sur Large Files and Big Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!