I am interested if it is possible to save figures which occurs during the loop.
For example, I have created some random matrix,
 r=rand(8,5)
r =
0.8147    0.9575    0.4218    0.6787    0.2769
0.9058    0.9649    0.9157    0.7577    0.0462
0.1270    0.1576    0.7922    0.7431    0.0971
0.9134    0.9706    0.9595    0.3922    0.8235
0.6324    0.9572    0.6557    0.6555    0.6948
0.0975    0.4854    0.0357    0.1712    0.3171
0.2785    0.8003    0.8491    0.7060    0.9502
0.5469    0.1419    0.9340    0.0318    0.0344
now if I use this line
plot(r(1,:))
I get following figure

My question is, if I use loop
for i=1:8
   plot(r(i,:))
end
it shows me one graph of  row, but it odes not do cycle, so can I show all  8  figures  step by step in matlab. For exmaple interval may be 10 seconds, for this as I know function movie is used, also getframe, or could I save figures in loop?
Also, I know that imsave or something like this. I think better would be  save somewhere, so if I can use  like this
imsave(plot(r(i,:))
 
     
     
    