Speed up loading a single variable from a large mat file
Show older comments
I was trying to load a single variable 'data' from a large .mat file (>2GB) using the following command in MATLAB R2016b on Mac OS.
data = load('db.mat','-mat','data');
However, it was too slow to load the single variable. Note that the variable 'data' is not a matrix but a structure. I already refer to the previous discussion but it didn't give solution. Could anyone please suggest an alternative way to speed up loading a single variable from a large mat file? Thank you for your help in advance.
1 Comment
per isakson
on 18 Jul 2017
Edited: per isakson
on 18 Jul 2017
- ">2GB" means version '-v7.3', I assume.
- '-nocompression' improves speed, but not that much
- AFAIK: '-v7.3' is slow. (I didn't test that since R2013a.)
- Try HDF5 files with 'ChunkSize' Default: Not chunked
Accepted Answer
More Answers (0)
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!