Dear all,
I would like to load some .mat file in this way:
File1 = 'D:\prj\MyComp\name.mat';File2 = 'D:\prj\MyComp\anothername.mat';File3 = 'D:\prj\MyComp\anotherdifferentname.mat';namesWork = who;outStr = regexpi(namesWork,'File');ind = ~cellfun('isempty',outStr);ind = ind(ind==1);for h = 1:length(ind) load(['File' num2str(h)]) ...end
But it returns this error message:
Error using loadUnable to read file 'File1'. No such file or directory.
Thanks in advance, JOE
Best Answer