load being 3x faster than importdata
27 views (last 30 days)
Show older comments
We want to load big mat files (about 4gb) tried:
tic; ee1=load('my_big_fat_file.mat'); t1=toc
tic; ee2=importdata('my_big_fat_file.mat'); t2=toc
comments please. thanks
Adam on 10 May 2018
Not sure why you would use importdata for mat files. importdata works for various more complicated formats so I imagine does some checks and things un-necessary for a MAT file that load is designed to read in. The data in a mat file would be loaded in in exactly the format it was stored (e.g. class object, array, struct) so doesn't require any interpretation as reading from a non-Matlab format may.
Jan on 10 May 2018
As you see load is faster than importdata for a MAT files. To save time and energy use load.
More Answers (0)
Find more on Data Import and Analysis 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!