function who seems slow
Show older comments
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
Accepted Answer
More Answers (1)
Cameron B
on 16 Mar 2021
Not sure, but maybe one of these is faster
load('filename.mat')
exist('my_variable')
or
load('filename.mat','my_variable')
1 Comment
Kenny Nona
on 16 Mar 2021
Categories
Find more on Startup and Shutdown 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!