function who seems slow
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Cameron B
el 16 de Mzo. de 2021
Not sure, but maybe one of these is faster
load('filename.mat')
exist('my_variable')
or
load('filename.mat','my_variable')
1 comentario
Kenny Nona
el 16 de Mzo. de 2021
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!