|
Correction, the loop looks like
for i = 2:week-1
try
s = ['load Group' int2str(i) '.mat'];
eval(s);
catch ME1
idSegLast = regexp(ME1.identifier, '(?<=:)\w+$', 'match');
sprintf('Could not find Week%d.mat',i);
end
end
I would eventually like to place it a while loop that would do something like this
while t = 1
load Groupx.mat
compare fGroup and Groupx
break if different
else rerun sorting function on fGroup and reset i
end
"Becky J." <rebecca.jaiven@gmail.com> wrote in message <h8on3v$pt5$1@fred.mathworks.com>...
> Hello,
>
> I have an specified number of .mat files that may or may not exist, and I call them into my function by
>
> for i = 2:week
> s = ['load Group' int2str(i) '.mat']
> eval(s);
> end
>
> I want to evaluate in all the GroupX.mat files in my folder, and than call them and compare them (they are nx4 matrices).
>
> So I want to compare my previously saved Group2.mat to my current fGroup matrix I calculated.
>
> I am having difficult explicitly pulling out my GroupX matrices to compare, I don't know how to reference them if I cannot assume they are Group2, Group3, ect...
> Thanks,
|