Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: waitbar with 2 bars
Date: Mon, 10 Nov 2008 09:07:01 +0000 (UTC)
Organization: Helbling Technik Bern AG
Lines: 40
Message-ID: <gf8tjl$lce$1@fred.mathworks.com>
References: <gf1h0e$8d5$1@fred.mathworks.com> <gf1kij$mj6$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1226308021 21902 172.30.248.35 (10 Nov 2008 09:07:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 10 Nov 2008 09:07:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1271984
Xref: news.mathworks.com comp.soft-sys.matlab:499868


"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!