<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238838</link>
    <title>MATLAB Central Newsreader - waitbar with 2 bars</title>
    <description>Feed for thread: waitbar with 2 bars</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 07 Nov 2008 13:49:02 -0500</pubDate>
      <title>waitbar with 2 bars</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238838#609578</link>
      <author>Gavrilo Bozovic</author>
      <description>Hi!&lt;br&gt;
&lt;br&gt;
I have a function that runs for a long time, with two imbricated for loops.&lt;br&gt;
&lt;br&gt;
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?&lt;br&gt;
&lt;br&gt;
Thanks in advance!</description>
    </item>
    <item>
      <pubDate>Fri, 07 Nov 2008 14:49:55 -0500</pubDate>
      <title>Re: waitbar with 2 bars</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238838#609592</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Gavrilo Bozovic&quot; &amp;lt;gavrilo.bozovic@helbling.ch&amp;gt; wrote in message &lt;br&gt;
news:gf1h0e$8d5$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; Hi!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I have a function that runs for a long time, with two imbricated for &lt;br&gt;
&amp;gt; loops.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is it possible to have a waitbar window with two waitbars, one showing the &lt;br&gt;
&amp;gt; progression within the first loop, and one within the imbricated one?&lt;br&gt;
&lt;br&gt;
Not without creating a modified WAITBAR function and tweaking it to do what &lt;br&gt;
you've described.  However, you can do something similar to what you've &lt;br&gt;
described:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
h1 = waitbar(0, 'Waitbar 1', 'Units', 'normalized', 'Position', [0.25 0.4 &lt;br&gt;
0.25 0.2]);&lt;br&gt;
for k = 1:10&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;waitbar(k/10, h1);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pause(0.1)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;h2 = waitbar(0, 'Waitbar 2', 'Units', 'normalized', 'Position', [0.5 0.4 &lt;br&gt;
0.25 0.2]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for m = 1:20&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;waitbar(m/20, h2);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pause(0.1)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;close(h2)&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Mon, 10 Nov 2008 09:07:01 -0500</pubDate>
      <title>Re: waitbar with 2 bars</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238838#609944</link>
      <author>Gavrilo Bozovic</author>
      <description>&quot;Steven Lord&quot; &amp;lt;slord@mathworks.com&amp;gt; wrote in message &amp;lt;gf1kij$mj6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Gavrilo Bozovic&quot; &amp;lt;gavrilo.bozovic@helbling.ch&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:gf1h0e$8d5$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; Hi!&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I have a function that runs for a long time, with two imbricated for &lt;br&gt;
&amp;gt; &amp;gt; loops.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Is it possible to have a waitbar window with two waitbars, one showing the &lt;br&gt;
&amp;gt; &amp;gt; progression within the first loop, and one within the imbricated one?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Not without creating a modified WAITBAR function and tweaking it to do what &lt;br&gt;
&amp;gt; you've described.  However, you can do something similar to what you've &lt;br&gt;
&amp;gt; described:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; h1 = waitbar(0, 'Waitbar 1', 'Units', 'normalized', 'Position', [0.25 0.4 &lt;br&gt;
&amp;gt; 0.25 0.2]);&lt;br&gt;
&amp;gt; for k = 1:10&lt;br&gt;
&amp;gt;     waitbar(k/10, h1);&lt;br&gt;
&amp;gt;     pause(0.1)&lt;br&gt;
&amp;gt;     h2 = waitbar(0, 'Waitbar 2', 'Units', 'normalized', 'Position', [0.5 0.4 &lt;br&gt;
&amp;gt; 0.25 0.2]);&lt;br&gt;
&amp;gt;     for m = 1:20&lt;br&gt;
&amp;gt;         waitbar(m/20, h2);&lt;br&gt;
&amp;gt;         pause(0.1)&lt;br&gt;
&amp;gt;     end&lt;br&gt;
&amp;gt;     close(h2)&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; slord@mathworks.com &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
hi Steve!&lt;br&gt;
&lt;br&gt;
Thanks for your answer, that will do the trick for my application!</description>
    </item>
  </channel>
</rss>

