>I would like to update and display a figure as I do
>calculations in a loop. For example:
>t = 0:1:100;
>while flag < 0
> %Do some calculations to generate x
[quoted text clipped - 8 lines]
>
>end
>Although the figure does update after each run through the
>while loop, if I minimize the window then try to view it
[quoted text clipped - 3 lines]
>view the figure. Only if the figure window is in front of
>all other windows I have open can I see the update.
I think the only thing you can do is add calls to
drawnow('expose') into the calculations to reduce the time until
your figure gets redrawn. Redrawing is a non-trivial matlab
process, as it has to detect the portion of the screen that needs
to be redrawn and redraws just that part.
*Possibly* setting the figure to be double-buffered might help,
but I'm not convinced.

Signature
"He wove a great web of knowledge, linking everything together,
and sat modestly at a switchboard at the center, eager to help."
-- Walter Kerr
Theresa - 31 Jul 2008 23:43 GMT
I did try that and it doesn't help...but I did discover
that if I dock the figure, then I can minimize and maximize
the Matlab window whenever I want and see the figure, even
if it's in the middle of the while loop.
Thanks for the reply!
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g6rkol$60v$1@canopus.cc.umanitoba.ca>...
> >I would like to update and display a figure as I do
> >calculations in a loop. For example:
[quoted text clipped - 30 lines]
> *Possibly* setting the figure to be double-buffered might help,
> but I'm not convinced.