<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Solving a Matlab hang problem	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solving-a-matlab-hang-problem</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Sun, 24 Sep 2017 08:02:59 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-413949</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 24 Sep 2017 08:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-413949</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-413866&quot;&gt;Katie&lt;/a&gt;.

@Katie – I do not have an immediate answer for you. If you’d like me to investigate this (for a consulting fee) then email me.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-413866">Katie</a>.</p>
<p>@Katie – I do not have an immediate answer for you. If you’d like me to investigate this (for a consulting fee) then email me.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Katie		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-413866</link>

		<dc:creator><![CDATA[Katie]]></dc:creator>
		<pubDate>Thu, 21 Sep 2017 19:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-413866</guid>

					<description><![CDATA[Yair,

I&#039;m having a strange issue that may be related to this. I have a complex set of plots that I have grouped, docked, and undocked as a group. Somehow, in this last step, the edit plot tool keeps being turned on. I have it coded to be off and switch to data cursor mode. It did this about 80% of the time I ran the code. With this fix it&#039;s knocked it down to about 30%, but I can&#039;t get it to stop completely. Any ideas what&#039;s causing this?

By the way, thanks for this amazing site, and the book! They&#039;ve been lifesavers.]]></description>
			<content:encoded><![CDATA[<p>Yair,</p>
<p>I&#8217;m having a strange issue that may be related to this. I have a complex set of plots that I have grouped, docked, and undocked as a group. Somehow, in this last step, the edit plot tool keeps being turned on. I have it coded to be off and switch to data cursor mode. It did this about 80% of the time I ran the code. With this fix it&#8217;s knocked it down to about 30%, but I can&#8217;t get it to stop completely. Any ideas what&#8217;s causing this?</p>
<p>By the way, thanks for this amazing site, and the book! They&#8217;ve been lifesavers.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alex Becker		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-403552</link>

		<dc:creator><![CDATA[Alex Becker]]></dc:creator>
		<pubDate>Thu, 23 Mar 2017 13:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-403552</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-403541&quot;&gt;Alex Becker&lt;/a&gt;.

Thanks Yair,
the problem is that there are many GUI elements and I don&#039;t know when exactly the matlab hangs.
I will probably add a logger for each callback in order to find the trouble-making callbacks.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-403541">Alex Becker</a>.</p>
<p>Thanks Yair,<br />
the problem is that there are many GUI elements and I don&#8217;t know when exactly the matlab hangs.<br />
I will probably add a logger for each callback in order to find the trouble-making callbacks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-403543</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 23 Mar 2017 08:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-403543</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-403541&quot;&gt;Alex Becker&lt;/a&gt;.

@Alex - I don&#039;t recommend adding drawnow/pause everywhere, only in those places that you see cause a problem. In most cases you do not need to add it. You probably see that the hang occurs at a specific callback, and I would put drawnow/pause only in that callback.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-403541">Alex Becker</a>.</p>
<p>@Alex &#8211; I don&#8217;t recommend adding drawnow/pause everywhere, only in those places that you see cause a problem. In most cases you do not need to add it. You probably see that the hang occurs at a specific callback, and I would put drawnow/pause only in that callback.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alex Becker		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-403541</link>

		<dc:creator><![CDATA[Alex Becker]]></dc:creator>
		<pubDate>Thu, 23 Mar 2017 08:17:29 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-403541</guid>

					<description><![CDATA[Hi Yair,
I have exactly the same problem. All symptoms that you&#039;ve described.
However I don&#039;t work with modal dialogs. I work with GUI with many different elements (I built it without GUIDE).
Would you recommend to add drawnow; pause(0.05); to every callback function as a first row right after the function declaration?]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,<br />
I have exactly the same problem. All symptoms that you&#8217;ve described.<br />
However I don&#8217;t work with modal dialogs. I work with GUI with many different elements (I built it without GUIDE).<br />
Would you recommend to add drawnow; pause(0.05); to every callback function as a first row right after the function declaration?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: g.		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-398454</link>

		<dc:creator><![CDATA[g.]]></dc:creator>
		<pubDate>Sun, 08 Jan 2017 16:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-398454</guid>

					<description><![CDATA[Hi,

I have a similar problem under Linux, Ubuntu 16.04. Matlab hangs up when using the &quot;print&quot; command to export figures. I can not interrupt the software and I have to kill the process.

My script makes simple 3d graphics and uses some additional functions written by me. What is weird is that the problem is systematic, however, the same functions, used to generate other plots, do not causes any problem. The problem arises with the print command, no matter the option used. Matlab goes in &quot;Busy&quot; state but it allows me to, e.g., edit the script.

I tried to add before/after the print command the pause and/or drawnow commands but without success as suggested here (.

uname -a
Linux laresa 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 8.3.0.532 (R2014a)
MATLAB License Number: ••••••
Operating System: Linux 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64
Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------

Any help is welcome g.]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I have a similar problem under Linux, Ubuntu 16.04. Matlab hangs up when using the &#8220;print&#8221; command to export figures. I can not interrupt the software and I have to kill the process.</p>
<p>My script makes simple 3d graphics and uses some additional functions written by me. What is weird is that the problem is systematic, however, the same functions, used to generate other plots, do not causes any problem. The problem arises with the print command, no matter the option used. Matlab goes in &#8220;Busy&#8221; state but it allows me to, e.g., edit the script.</p>
<p>I tried to add before/after the print command the pause and/or drawnow commands but without success as suggested here (.</p>
<p>uname -a<br />
Linux laresa 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</p>
<p>ver<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
MATLAB Version: 8.3.0.532 (R2014a)<br />
MATLAB License Number: ••••••<br />
Operating System: Linux 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64<br />
Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Any help is welcome g.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-396525</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 17 Dec 2016 17:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-396525</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-396382&quot;&gt;Joe S&lt;/a&gt;.

:-)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-396382">Joe S</a>.</p>
<p>🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Joe S		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-396382</link>

		<dc:creator><![CDATA[Joe S]]></dc:creator>
		<pubDate>Fri, 16 Dec 2016 16:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-396382</guid>

					<description><![CDATA[Perfect, thanks!  Enjoy a cup of coffee.]]></description>
			<content:encoded><![CDATA[<p>Perfect, thanks!  Enjoy a cup of coffee.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Shruti		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-390641</link>

		<dc:creator><![CDATA[Shruti]]></dc:creator>
		<pubDate>Thu, 13 Oct 2016 18:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-390641</guid>

					<description><![CDATA[Hi everyone, I have a MATLAB GUI that has a couple of drop-down menus, edit text-boxes, check-boxes and push-buttons.
Now, I am running a while loop in the background continuously as I need to check if it is midnight. If it is, I perform some functions. The issue is, even though I use drawnow and pause in my while loop, sometimes MATLAB still hangs-up on me and the GUI becomes unresponsive and does not recognize any of the user inputs. Here is the while loop part of my code:

&lt;pre lang=&quot;matlab&quot;&gt;
while stop_timer==0
    pause(0.1);
    drawnow;
    pause(0.1);
    current_time=clock;
    if current_time(4)==0
        post_mortem;
    end
end
&lt;/pre&gt;

Does anybody have any solution to this? On searching for answers to previous similar questions, the solution seemed to be to use drawnow and pause, but that doesn&#039;t seem to be working for me either.

Any guidance would be appreciated.

Thank you]]></description>
			<content:encoded><![CDATA[<p>Hi everyone, I have a MATLAB GUI that has a couple of drop-down menus, edit text-boxes, check-boxes and push-buttons.<br />
Now, I am running a while loop in the background continuously as I need to check if it is midnight. If it is, I perform some functions. The issue is, even though I use drawnow and pause in my while loop, sometimes MATLAB still hangs-up on me and the GUI becomes unresponsive and does not recognize any of the user inputs. Here is the while loop part of my code:</p>
<pre lang="matlab">
while stop_timer==0
    pause(0.1);
    drawnow;
    pause(0.1);
    current_time=clock;
    if current_time(4)==0
        post_mortem;
    end
end
</pre>
<p>Does anybody have any solution to this? On searching for answers to previous similar questions, the solution seemed to be to use drawnow and pause, but that doesn&#8217;t seem to be working for me either.</p>
<p>Any guidance would be appreciated.</p>
<p>Thank you</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jay Willis		</title>
		<link>https://undocumentedmatlab.com/articles/solving-a-matlab-hang-problem#comment-377057</link>

		<dc:creator><![CDATA[Jay Willis]]></dc:creator>
		<pubDate>Tue, 17 May 2016 15:29:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3617#comment-377057</guid>

					<description><![CDATA[Thanks. This fix (&lt;code&gt;drawnow; pause(0.05)&lt;/code&gt;) still works for me, using R2015b]]></description>
			<content:encoded><![CDATA[<p>Thanks. This fix (<code>drawnow; pause(0.05)</code>) still works for me, using R2015b</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
