MATLAB: I want to save matrix at each iteration to later use for Multiplication

iterationsMATLABmatrixsave

I have written a code, it is working fne, but i couldnot save the result at each step.
clear all;
clc
a=0:1;
b=0:1;
c=0:1;
l=length (a);
m=length (b);
n=length (c);
for i=1:l
for j=1:m
for k=1:n
F = [1 a(:,i) b(:,j);0 1 c(:,k);0 0 1]
end
end
end
Please guide me, Thanks

Best Answer

Store it as a cell array (use curly brackets). The following works:
clear all;
clc
a=0:1;
b=0:1;
c=0:1;
l=length (a);
m=length (b);
n=length (c);
counter = 1;
for i=1:l
for j=1:m
for k=1:n
F{counter} = [1 a(:,i) b(:,j);0 1 c(:,k);0 0 1]
counter = counter + 1;
end
end
end
If you wanted to access the first matrix you would call the following:
F{1}