Matlab plot inside a loop

Posted by Macarse on Stack Overflow See other posts from Stack Overflow or by Macarse
Published on 2010-05-10T02:51:06Z Indexed on 2010/05/10 2:58 UTC
Read the original article Hit count: 435

Filed under:
|

I am doing something like this:

a = [1:100];
for i=1:100,
 plot([1:i], a(1:i));
end

My issue is that the plot is not shown until the loop is finish. How can I show/update the plot in every iteration?

© Stack Overflow or respective owner

Related posts about matlab

Related posts about plotting