|
From: | Søren Hauberg |
Subject: | Re: Plotting during iterations |
Date: | Tue, 21 Aug 2007 15:30:19 +0200 |
User-agent: | Thunderbird 1.5.0.12 (X11/20070604) |
Rupert Swarbrick skrev:
I think you can just call 'plot' inside your loop, and then call 'drawnow' to force the plot to be shown. Something like this (untested code):Following on from Antonio's question earlier "monitoring iterations", is there a way to get plots to come out during iterations? In this case, I've got an unpleasant parameter estimation problem with a few hundred iterations, each of which takes about 5-10 seconds and can plot a graph at the end. I would like to be able to see the graphs in turn (they can replace each other!! I only want one up at once), to see how the graphs are evolving. Is this possible?
for i = 1:10 x = linspace(0, 2*pi); y = sin(i*x); plot(x, y); drawnow endfor Søren
[Prev in Thread] | Current Thread | [Next in Thread] |