|
"Steven Lord" <slord@mathworks.com> wrote in message <gf1kij$mj6$1@fred.mathworks.com>...
>
> "Gavrilo Bozovic" <gavrilo.bozovic@helbling.ch> wrote in message
> news:gf1h0e$8d5$1@fred.mathworks.com...
> > Hi!
> >
> > I have a function that runs for a long time, with two imbricated for
> > loops.
> >
> > Is it possible to have a waitbar window with two waitbars, one showing the
> > progression within the first loop, and one within the imbricated one?
>
> Not without creating a modified WAITBAR function and tweaking it to do what
> you've described. However, you can do something similar to what you've
> described:
>
>
> h1 = waitbar(0, 'Waitbar 1', 'Units', 'normalized', 'Position', [0.25 0.4
> 0.25 0.2]);
> for k = 1:10
> waitbar(k/10, h1);
> pause(0.1)
> h2 = waitbar(0, 'Waitbar 2', 'Units', 'normalized', 'Position', [0.5 0.4
> 0.25 0.2]);
> for m = 1:20
> waitbar(m/20, h2);
> pause(0.1)
> end
> close(h2)
> end
>
>
> --
> Steve Lord
> slord@mathworks.com
>
hi Steve!
Thanks for your answer, that will do the trick for my application!
|