load being 3x faster than importdata

조회 수: 20 (최근 30일)
Paramonte
Paramonte 2018년 5월 10일
답변: Jan 2018년 5월 10일
We want to load big mat files (about 4gb) tried:
tic; ee1=load('my_big_fat_file.mat'); t1=toc
t1=81.3492
tic; ee2=importdata('my_big_fat_file.mat'); t2=toc
t2= 262.3173
comments please. thanks
  댓글 수: 1
Adam
Adam 2018년 5월 10일
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
Jan 2018년 5월 10일
As you see load is faster than importdata for a MAT files. To save time and energy use load.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by