load a matlab file
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Image Analyst
2013년 1월 24일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!