Date: Sep 18, 2013 2:22 AM
Author: John Dickson
Subject: Saving matrix each iteration

So I have two matrix A which keeps changing every iteration. I do 10 iterations and so I get 10 A's. Each A is increased by one row at the end of each iteration. I also have an external loop k=50,100,150. For each k I generate 10 matrix. So in this case I generate totally 30 matrix. My question is how do I save them so that I can use it for future calculation.

while k<=150
B = cell(10,1);
For i=1:10
A(end+1,:) = M(rowIdx,:)
B{c} = A;

This will save only 10 matrix created for each k. Is there any way I can generate B{c}{k} kind of matrix?