How to import multiple .mat files to workspace?
Hi,
As cited above, I’m trying to import multiple .mat files (total 72 no. of .mat files) which are at the location as in the code below. However the code doesn’t import the files to the workspace and throws error as below.
files = dir(‘D:RahulData_tokamakdata&plotdata_paper1H-mode dataH-mode bistable modelset1_neoAno_ratio_10beta0.01Contourplot*.mat’);
for i=1:length(files)
load(files(i).name,’-ascii’);
end
ERROR:
Error using load
with regards,
rcHi,
As cited above, I’m trying to import multiple .mat files (total 72 no. of .mat files) which are at the location as in the code below. However the code doesn’t import the files to the workspace and throws error as below.
files = dir(‘D:RahulData_tokamakdata&plotdata_paper1H-mode dataH-mode bistable modelset1_neoAno_ratio_10beta0.01Contourplot*.mat’);
for i=1:length(files)
load(files(i).name,’-ascii’);
end
ERROR:
Error using load
with regards,
rc Hi,
As cited above, I’m trying to import multiple .mat files (total 72 no. of .mat files) which are at the location as in the code below. However the code doesn’t import the files to the workspace and throws error as below.
files = dir(‘D:RahulData_tokamakdata&plotdata_paper1H-mode dataH-mode bistable modelset1_neoAno_ratio_10beta0.01Contourplot*.mat’);
for i=1:length(files)
load(files(i).name,’-ascii’);
end
ERROR:
Error using load
with regards,
rc data import MATLAB Answers — New Questions