<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for Doug's Pick of the Week</title>
	<link>http://blogs.mathworks.com/pick</link>
	<description>&#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=982174&#38;objectType=author"&#62;Doug Hull&#60;/a&#62; is an Application Engineer at &#60;a href="http://www.mathworks.com"&#62;The MathWorks&#60;/a&#62;. This blog is dedicated to promoting the &#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/"&#62;File Exchange&#60;/a&#62; by highlighting files and original video content.&#60;/p&#62;&#60;a href="/images/pick/doug-full.jpg"&#62;&#60;img src="/images/pick/doug.jpg" width="164" height="282" border="0"&#62;&#60;/a&#62;&#60;br /&#62;&#60;br /&#62; &#60;a href="http://blogs.mathworks.com/pick/how-to-get-help/"&#62; Get help here &#60;/a&#62;</description>
	<pubDate>Mon, 08 Sep 2008 06:32:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>Comment on Puzzler: Find largest connected island by Tim Davis</title>
		<link>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12766</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Mon, 08 Sep 2008 00:58:30 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12766</guid>
		<description>Oh, I'm a bit dyslexic.  The code has a variable "west" that should be called "east."  East and West are the same to me, and I always get rows vs columns mixed up too ...

The code on the File Exchange will have the right name.</description>
		<content:encoded><![CDATA[<p>Oh, I&#8217;m a bit dyslexic.  The code has a variable &#8220;west&#8221; that should be called &#8220;east.&#8221;  East and West are the same to me, and I always get rows vs columns mixed up too &#8230;</p>
<p>The code on the File Exchange will have the right name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Puzzler: Find largest connected island by Tim Davis</title>
		<link>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12765</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Mon, 08 Sep 2008 00:54:56 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12765</guid>
		<description>The fix is to replace the max(diff(r)) line with:

&lt;pre&gt;&lt;code&gt;
[ignore b] = sortrows ([diff(r') a(p(r(1:end-1)))'])
b = b (end) ;
&lt;/pre&gt;&lt;/code&gt;

I'll post a file on the File Exchange that's commented so you can see what the algorithm is doing.  The non-commented code is:

&lt;pre&gt;&lt;code&gt;
function c = mySolver (a)
[m n] = size (a) ;
N = m*n ;
k = reshape (1:N, m, n) ;
west  = [(k (:,2:n) .* (a (:,1:n-1) == a (:,2:n))) zeros(m,1)] ;
south = [(k (2:m,:) .* (a (1:m-1,:) == a (2:m,:))) ; zeros(1,n)] ;
W = find (west) ;
S = find (south) ;
t = length (W) + length (S) + N ;
A = sparse ([k(W);k(S);(1:N)'], [west(W);south(S);(1:N)'], ones(t,1), N, N) ;
[p q r s] = dmperm (A+A') ;
[ignore b] = sortrows ([diff(r') a(p(r(1:end-1)))'])
b = b (end) ;
c = zeros (m,n) ;
c (p ([r(b) : r(b+1)-1])) = 1 ;
&lt;/pre&gt;&lt;/code&gt;

Thanks for pointing out the glitch.</description>
		<content:encoded><![CDATA[<p>The fix is to replace the max(diff(r)) line with:</p>
<pre><code>
[ignore b] = sortrows ([diff(r') a(p(r(1:end-1)))'])
b = b (end) ;
</code></pre>
<p></p>
<p>I&#8217;ll post a file on the File Exchange that&#8217;s commented so you can see what the algorithm is doing.  The non-commented code is:</p>
<pre><code>
function c = mySolver (a)
[m n] = size (a) ;
N = m*n ;
k = reshape (1:N, m, n) ;
west  = [(k (:,2:n) .* (a (:,1:n-1) == a (:,2:n))) zeros(m,1)] ;
south = [(k (2:m,:) .* (a (1:m-1,:) == a (2:m,:))) ; zeros(1,n)] ;
W = find (west) ;
S = find (south) ;
t = length (W) + length (S) + N ;
A = sparse ([k(W);k(S);(1:N)'], [west(W);south(S);(1:N)'], ones(t,1), N, N) ;
[p q r s] = dmperm (A+A') ;
[ignore b] = sortrows ([diff(r') a(p(r(1:end-1)))'])
b = b (end) ;
c = zeros (m,n) ;
c (p ([r(b) : r(b+1)-1])) = 1 ;
</code></pre>
<p></p>
<p>Thanks for pointing out the glitch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Puzzler: Find largest connected island by Tim Davis</title>
		<link>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12763</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Sun, 07 Sep 2008 17:50:28 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12763</guid>
		<description>Matt,
Good point, thanks for catching that.  I missed that in the problem statement.

It's easy to fix.  The size of each component is given by diff(r), where the kth component is nodes p(r(k):r(k+1)-1) where a "node" is an entry in the linear-index order of the image a.  

max(diff(r)) just finds the biggest one.  It's a small tweak to pick amongst the ties.  I'll post an update.</description>
		<content:encoded><![CDATA[<p>Matt,<br />
Good point, thanks for catching that.  I missed that in the problem statement.</p>
<p>It&#8217;s easy to fix.  The size of each component is given by diff(r), where the kth component is nodes p(r(k):r(k+1)-1) where a &#8220;node&#8221; is an entry in the linear-index order of the image a.  </p>
<p>max(diff(r)) just finds the biggest one.  It&#8217;s a small tweak to pick amongst the ties.  I&#8217;ll post an update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Puzzler: Find largest connected island by Matt Fig</title>
		<link>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12762</link>
		<dc:creator>Matt Fig</dc:creator>
		<pubDate>Sun, 07 Sep 2008 16:29:11 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12762</guid>
		<description>Tim,

There is a problem in your second code.  In the case when a zero block is the same size as a non-zero block, your code sometimes returns the zero block.

a = zeros(4) + triu(ones(4)) + diag([-1 -1 0 0])
vs.
a = zeros(4) + triu(ones(4)) + diag([0 0 -1 -1])</description>
		<content:encoded><![CDATA[<p>Tim,</p>
<p>There is a problem in your second code.  In the case when a zero block is the same size as a non-zero block, your code sometimes returns the zero block.</p>
<p>a = zeros(4) + triu(ones(4)) + diag([-1 -1 0 0])<br />
vs.<br />
a = zeros(4) + triu(ones(4)) + diag([0 0 -1 -1])</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Advanced MATLAB: Compiling a GUI by Moran</title>
		<link>http://blogs.mathworks.com/pick/2007/12/12/advanced-matlab-compiling-a-gui/#comment-12752</link>
		<dc:creator>Moran</dc:creator>
		<pubDate>Sun, 07 Sep 2008 02:03:55 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2007/12/12/advanced-matlab-compiling-a-gui/#comment-12752</guid>
		<description>Hi Chris,
I tried everything I could think of, and have sent several observations about this bug to support, but eventually lost all hope that this bug will be fixed in the immediate future (it has been already 2.5 months since I encountered it).

Fortunately, a great alternative exists! Check out Yair Altman's "CreateTable.m" code:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14225&#38;objectType=file 

The examples that Yair supplies make it very easy to learn how to use it, even for someone with no previous experience with Java (like me...).  Furthermore, this works great (and compiles) on previous versions of Matlab, so no need to upgrade to R2008x, and you can enjoy the much smaller MCR file size (150MB in 2007a vs. 240MB in 2008a). 

Hope this helps,
Moran</description>
		<content:encoded><![CDATA[<p>Hi Chris,<br />
I tried everything I could think of, and have sent several observations about this bug to support, but eventually lost all hope that this bug will be fixed in the immediate future (it has been already 2.5 months since I encountered it).</p>
<p>Fortunately, a great alternative exists! Check out Yair Altman&#8217;s &#8220;CreateTable.m&#8221; code:<br />
<a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14225&amp;objectType=file" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14225&amp;objectType=file</a> </p>
<p>The examples that Yair supplies make it very easy to learn how to use it, even for someone with no previous experience with Java (like me&#8230;).  Furthermore, this works great (and compiles) on previous versions of Matlab, so no need to upgrade to R2008x, and you can enjoy the much smaller MCR file size (150MB in 2007a vs. 240MB in 2008a). </p>
<p>Hope this helps,<br />
Moran</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Advanced MATLAB: Compiling a GUI by odessit</title>
		<link>http://blogs.mathworks.com/pick/2007/12/12/advanced-matlab-compiling-a-gui/#comment-12739</link>
		<dc:creator>odessit</dc:creator>
		<pubDate>Sat, 06 Sep 2008 10:59:50 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2007/12/12/advanced-matlab-compiling-a-gui/#comment-12739</guid>
		<description>Hello,
I have compiled standalone application with deploytool. It would work fine, but the error is in c:\user\Administrator\AppData\Local\MathWorks\mcr_cache_v78\myprog_.....\toolbox\images\icons\point.png
This icon is missed and everytime the program try to call it, it crashes. Wenn I copy this icon manually to this folder - it works! 
My question is how to compile my program together with this necessary icon? I think it must be compiled automatically. Wich previos version of matlab compiler I had no problems.
Thanks very much for help.
Leo</description>
		<content:encoded><![CDATA[<p>Hello,<br />
I have compiled standalone application with deploytool. It would work fine, but the error is in c:\user\Administrator\AppData\Local\MathWorks\mcr_cache_v78\myprog_&#8230;..\toolbox\images\icons\point.png<br />
This icon is missed and everytime the program try to call it, it crashes. Wenn I copy this icon manually to this folder - it works!<br />
My question is how to compile my program together with this necessary icon? I think it must be compiled automatically. Wich previos version of matlab compiler I had no problems.<br />
Thanks very much for help.<br />
Leo</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How our developers make MATLAB faster by Duane Hanselman</title>
		<link>http://blogs.mathworks.com/pick/2008/09/03/how-our-developers-make-matlab-faster/#comment-12727</link>
		<dc:creator>Duane Hanselman</dc:creator>
		<pubDate>Fri, 05 Sep 2008 18:12:30 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/09/03/how-our-developers-make-matlab-faster/#comment-12727</guid>
		<description>FYI...

% strmatch replacements
% strmatch is obsolete, strncmp and strcmp are built in
% case insensitive works too with strncmpi and strcmpi

idx=strmatch(str,strarray); % is replaced by
idx=find(strncmp(str,cellstr(strcell),length(str)));

% note that find( ) can be removed for logical results
% in any of these cases.

idx=strmatch(str,strcell); % is replaced by
idx=find(strncmp(str,strcell,length(str)));

idx=strmatch(str,strarray,'exact'); % is replaced by
idx=find(strcmp(strx,cellstr(strarray)));

idx=strmatch(str,strcell,'exact'); % is replaced by
idx=find(strcmp(strx,strcell));</description>
		<content:encoded><![CDATA[<p>FYI&#8230;</p>
<p>% strmatch replacements<br />
% strmatch is obsolete, strncmp and strcmp are built in<br />
% case insensitive works too with strncmpi and strcmpi</p>
<p>idx=strmatch(str,strarray); % is replaced by<br />
idx=find(strncmp(str,cellstr(strcell),length(str)));</p>
<p>% note that find( ) can be removed for logical results<br />
% in any of these cases.</p>
<p>idx=strmatch(str,strcell); % is replaced by<br />
idx=find(strncmp(str,strcell,length(str)));</p>
<p>idx=strmatch(str,strarray,&#8217;exact&#8217;); % is replaced by<br />
idx=find(strcmp(strx,cellstr(strarray)));</p>
<p>idx=strmatch(str,strcell,&#8217;exact&#8217;); % is replaced by<br />
idx=find(strcmp(strx,strcell));</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How our developers make MATLAB faster by Doug</title>
		<link>http://blogs.mathworks.com/pick/2008/09/03/how-our-developers-make-matlab-faster/#comment-12705</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Thu, 04 Sep 2008 14:23:31 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/09/03/how-our-developers-make-matlab-faster/#comment-12705</guid>
		<description>Duane,

I just looked, I did not see an m-lint warning against STRMATCH in 2008a.  However, I seem to recall what you mention also.  

I have entered this into our internal enhancement tracking database.

Thanks,
Doug</description>
		<content:encoded><![CDATA[<p>Duane,</p>
<p>I just looked, I did not see an m-lint warning against STRMATCH in 2008a.  However, I seem to recall what you mention also.  </p>
<p>I have entered this into our internal enhancement tracking database.</p>
<p>Thanks,<br />
Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Advanced MATLAB: Compiling a GUI by hashem</title>
		<link>http://blogs.mathworks.com/pick/2007/12/12/advanced-matlab-compiling-a-gui/#comment-12699</link>
		<dc:creator>hashem</dc:creator>
		<pubDate>Thu, 04 Sep 2008 07:08:56 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2007/12/12/advanced-matlab-compiling-a-gui/#comment-12699</guid>
		<description>Hi Doug,

I built a GUI and write a help for it in "chm" (compiled HTML file) format, and I can't find a comment in matlab for openig this file. Is here a comment to opning this 
file(s)?

Best regard,
Hashem,</description>
		<content:encoded><![CDATA[<p>Hi Doug,</p>
<p>I built a GUI and write a help for it in &#8220;chm&#8221; (compiled HTML file) format, and I can&#8217;t find a comment in matlab for openig this file. Is here a comment to opning this<br />
file(s)?</p>
<p>Best regard,<br />
Hashem,</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Puzzler: Find largest connected island by Tim Davis</title>
		<link>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12692</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Thu, 04 Sep 2008 01:44:18 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/18/puzzler-find-largest-connected-island/#comment-12692</guid>
		<description>I left out the comments in the code, above.  Most of the functions should be familiar to most MATLAB users.  dmperm is the odd one; you can read more about dmperm and how it works, and look at its source code, here:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11740&#38;objectType=FILE</description>
		<content:encoded><![CDATA[<p>I left out the comments in the code, above.  Most of the functions should be familiar to most MATLAB users.  dmperm is the odd one; you can read more about dmperm and how it works, and look at its source code, here:</p>
<p><a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11740&amp;objectType=FILE" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11740&amp;objectType=FILE</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
