The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Saving matrix each iteration
Replies: 5   Last Post: Sep 20, 2013 10:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
John Dickson

Posts: 19
Registered: 10/30/11
Saving matrix each iteration
Posted: Sep 18, 2013 2:22 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.