MATLAB: How to load matrices from mat file

mat file matrice

I have 500 matrices named A1B'1….20'C'1…25' in mat format. I need to make them look like A1BiCj( where i=1:20 and j=1:25) to do function on them. does anyone knows how I can do it?!

Best Answer

load yourmatfile.mat
for i = 1:20
for j = 1:25
eval(['A1(:,:,' int2str(i) ',' int2str(j) ') = A1B' int2str(i) 'C' int2str(j) ';'])
end
end
Now you can access A1B10C13 as
A1(:,:,10,13)