load a matlab file
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi!
i have big data and i saved it in a mat file named All_data.
%
save('All_data','data1','data2','data3')
data1: [2970290x1 double]
data2: [2970290x1 double]
data3: {2970290x1 cell}
I want now to evalute the data in the file All_dat. Iused load('All_data'). But the data1, data2, data3 are not loadad.
should i load all of them with the load function, or there is any other smart method?
Thank you
1 Commento
Risposta accettata
Image Analyst
il 24 Gen 2013
Try this
fullFileName = fullfile(pwd, 'All_data.mat');
if exist(fullFileName, 'file')
storedStructure = load(fullFileName)
data1 = storedStructure.data1
data2 = storedStructure.data2
data3 = storedStructure.data3
else
warningMessage = sprintf('Error: the file does not exist:\n%s', fullFileName);
uiwait(warndlg(warningMessage));
end
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Holidays / Seasons in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!