<?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: A couple of internal Matlab bugs and workarounds	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=couple-of-bugs-and-workarounds</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Wed, 10 Dec 2014 22:56:05 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Another couple of Matlab bugs and workarounds &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds#comment-340869</link>

		<dc:creator><![CDATA[Another couple of Matlab bugs and workarounds &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Wed, 10 Dec 2014 22:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3865#comment-340869</guid>

					<description><![CDATA[[...] mind, I don&#8217;t take it personally, I simply find a workaround and move on. I&#8217;ve already posted about this before. Today I&#8217;ll discuss two additional bugs I&#8217;ve run across once-too-often, and my [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] mind, I don&#8217;t take it personally, I simply find a workaround and move on. I&#8217;ve already posted about this before. Today I&#8217;ll discuss two additional bugs I&#8217;ve run across once-too-often, and my [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Donn Shull		</title>
		<link>https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds#comment-213034</link>

		<dc:creator><![CDATA[Donn Shull]]></dc:creator>
		<pubDate>Sat, 15 Jun 2013 16:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3865#comment-213034</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds#comment-211842&quot;&gt;Dan&lt;/a&gt;.

I agree that the disparity between these two values is odd. I might consider it as a feature and explain it as follows.
&lt;pre lang=&quot;matlab&quot;&gt; 
Dialog Values = get_param(gcb,&#039;MaskValues&#039;) 
&lt;/pre&gt;
returns the values from the dialog for the mask even if they have not been &quot;applied&quot;
&lt;pre lang=&quot;matlab&quot;&gt; 
BlockMask = Simulink.Mask.get(gcb)
MaskValues = BlockMask.Parameters 
&lt;/pre&gt;
returns the mask parameters that are being used by the block.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds#comment-211842">Dan</a>.</p>
<p>I agree that the disparity between these two values is odd. I might consider it as a feature and explain it as follows.</p>
<pre lang="matlab"> 
Dialog Values = get_param(gcb,'MaskValues') 
</pre>
<p>returns the values from the dialog for the mask even if they have not been &#8220;applied&#8221;</p>
<pre lang="matlab"> 
BlockMask = Simulink.Mask.get(gcb)
MaskValues = BlockMask.Parameters 
</pre>
<p>returns the mask parameters that are being used by the block.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrew		</title>
		<link>https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds#comment-212712</link>

		<dc:creator><![CDATA[Andrew]]></dc:creator>
		<pubDate>Fri, 14 Jun 2013 22:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3865#comment-212712</guid>

					<description><![CDATA[I&#039;ve noticed this as well. I find it unhelpful as a developer. It can be useful to know if a bug exists and/or has been fixed in a particular version. This way one can apply workarounds if needed in code used by people who may be running many different versions of Matlab. 

For example, Matlab 7.14 (R2012a), 7.13 (R2011b), and probably earlier, has a bug in the inverse complementary error function, &lt;i&gt;&lt;b&gt;erfcinv&lt;/b&gt;&lt;/i&gt;, where &lt;i&gt;&lt;b&gt;erfcinv&lt;/b&gt;(eps(realmin))&lt;/i&gt; returns &lt;code&gt;NaN&lt;/code&gt; instead of a finite real value as would be expected and as indicated by the documentation (this occurs in single precision as well). I reported this bug and suggested a simple &quot;workaround.&quot; The bug was acknowledged and I even suggested how it might be fixed when the engineer explained the reason for the underflow. The bug was fixed in Matlab 8.0 (R2012b), but it never showed up in the online database so you&#039;d never know that it exists/existed.

By the way, here is code that will apply a workaround in pre-R2012b versions:
&lt;pre lang=&quot;matlab&quot;&gt;x = erfcinv(y);
if verLessThan(&#039;matlab&#039;,&#039;8.0&#039;)
    if isa(p,&#039;double&#039;)
        x(y == 2^-1074) = 27.216482834230213;
    else
        x(y == 2^-149) = 10.0198345;
    end
end
&lt;/pre&gt;
Of course &lt;i&gt;&lt;b&gt;verLessThan&lt;/b&gt;&lt;/i&gt; only goes back to Matlab 7.4 (R2007a), but that&#039;s as far back as I try to retain support...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed this as well. I find it unhelpful as a developer. It can be useful to know if a bug exists and/or has been fixed in a particular version. This way one can apply workarounds if needed in code used by people who may be running many different versions of Matlab. </p>
<p>For example, Matlab 7.14 (R2012a), 7.13 (R2011b), and probably earlier, has a bug in the inverse complementary error function, <i><b>erfcinv</b></i>, where <i><b>erfcinv</b>(eps(realmin))</i> returns <code>NaN</code> instead of a finite real value as would be expected and as indicated by the documentation (this occurs in single precision as well). I reported this bug and suggested a simple &#8220;workaround.&#8221; The bug was acknowledged and I even suggested how it might be fixed when the engineer explained the reason for the underflow. The bug was fixed in Matlab 8.0 (R2012b), but it never showed up in the online database so you&#8217;d never know that it exists/existed.</p>
<p>By the way, here is code that will apply a workaround in pre-R2012b versions:</p>
<pre lang="matlab">x = erfcinv(y);
if verLessThan('matlab','8.0')
    if isa(p,'double')
        x(y == 2^-1074) = 27.216482834230213;
    else
        x(y == 2^-149) = 10.0198345;
    end
end
</pre>
<p>Of course <i><b>verLessThan</b></i> only goes back to Matlab 7.4 (R2007a), but that&#8217;s as far back as I try to retain support&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dan		</title>
		<link>https://undocumentedmatlab.com/articles/couple-of-bugs-and-workarounds#comment-211842</link>

		<dc:creator><![CDATA[Dan]]></dc:creator>
		<pubDate>Thu, 13 Jun 2013 01:14:42 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3865#comment-211842</guid>

					<description><![CDATA[I&#039;m not sure if this is an error or a feature that I&#039;m not comprehending...

I&#039;ve started playing around with using Mask Objects (http://www.mathworks.com/help/simulink/slref/simulink.mask.get.html) from a Simulink Mask instead of using the old reliable &lt;pre lang=&quot;matlab&quot;&gt; MaskValues = get_param(gcb,&#039;MaskValues&#039;) &lt;/pre&gt;, etc...
I have a dialog callback that gets that Mask Object. The problem is the Mask Object it gives you gives parameters for the Mask BEFORE it was opened, and does not include changes that you have made to the mask since opening the simulink GUI.  (i.e. My dialog callback is working with old data).
My Fix: ??, go back to old reliable.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure if this is an error or a feature that I&#8217;m not comprehending&#8230;</p>
<p>I&#8217;ve started playing around with using Mask Objects (<a href="http://www.mathworks.com/help/simulink/slref/simulink.mask.get.html" rel="nofollow ugc">http://www.mathworks.com/help/simulink/slref/simulink.mask.get.html</a>) from a Simulink Mask instead of using the old reliable </p>
<pre lang="matlab"> MaskValues = get_param(gcb,'MaskValues') </pre>
<p>, etc&#8230;<br />
I have a dialog callback that gets that Mask Object. The problem is the Mask Object it gives you gives parameters for the Mask BEFORE it was opened, and does not include changes that you have made to the mask since opening the simulink GUI.  (i.e. My dialog callback is working with old data).<br />
My Fix: ??, go back to old reliable.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
