function who seems slow
이전 댓글 표시
Hello,
I am using the MATLAB function 'who' to assess which variables are present in a .mat file. Basically something like this:
fileInfo = who('-file','filename.mat');
To return if the variable is inside the file or not, I use something like this:
ismember('my_variable',fileInfo)
My .mat file is about 11Gb in size and the 'who' function takes a very long time to evaluate (about 5min). Is there a faster way to get the variable names from a .mat file?
The .mat files are v7.3.
Regards,
Kenny
채택된 답변
추가 답변 (1개)
Cameron B
2021년 3월 16일
Not sure, but maybe one of these is faster
load('filename.mat')
exist('my_variable')
or
load('filename.mat','my_variable')
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!