<?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: ismembc &#8211; undocumented helper function	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ismembc-undocumented-helper-function</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Sun, 15 Jul 2018 14:39:08 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432443</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 15 Jul 2018 14:39:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-432443</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432439&quot;&gt;Rik Wisselink&lt;/a&gt;.

@Rik - in a vast number of real-life use-cases, we already know in advance that either a or b or both are already sorted, and in this case &lt;i&gt;&lt;b&gt;ismembc&lt;/b&gt;&lt;/i&gt; is still faster than &lt;i&gt;&lt;b&gt;ismember&lt;/b&gt;&lt;/i&gt;, to this very day. 
Even if you sort the arrays yourself (as in your 3rd usage example), &lt;i&gt;&lt;b&gt;ismembc&lt;/b&gt;&lt;/i&gt; is still much faster than &lt;i&gt;&lt;b&gt;ismember&lt;/b&gt;&lt;/i&gt; for most Matlab releases and almost as fast even on the latest release.
To make a long story short, there is very little (or no) down-side to using &lt;i&gt;&lt;b&gt;ismembc&lt;/b&gt;&lt;/i&gt;, at least from a performance viewpoint, as long as your inputs are non-sparse etc.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432439">Rik Wisselink</a>.</p>
<p>@Rik &#8211; in a vast number of real-life use-cases, we already know in advance that either a or b or both are already sorted, and in this case <i><b>ismembc</b></i> is still faster than <i><b>ismember</b></i>, to this very day.<br />
Even if you sort the arrays yourself (as in your 3rd usage example), <i><b>ismembc</b></i> is still much faster than <i><b>ismember</b></i> for most Matlab releases and almost as fast even on the latest release.<br />
To make a long story short, there is very little (or no) down-side to using <i><b>ismembc</b></i>, at least from a performance viewpoint, as long as your inputs are non-sparse etc.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rik Wisselink		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432439</link>

		<dc:creator><![CDATA[Rik Wisselink]]></dc:creator>
		<pubDate>Sun, 15 Jul 2018 13:01:12 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-432439</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299787&quot;&gt;Ramy&lt;/a&gt;.

I&#039;m sorry, I edited my code after I already pasted the code here and forgot to update the code along with the output. The remarks in the posted text still stand though. Below is a 20 iteration version along with the sum timings.

&lt;pre lang=&quot;matlab&quot;&gt;
clc,n=2e6; a=ceil(n*rand(n,1)); b=ceil(n*rand(n,1)); d=sort(b);c=sort(a);
t_option=zeros(4,20);
for n_tic=1:size(t_option,2)
   tic; ismembc(c,d);              t_option(1,n_tic)=toc;
   tic; ismember(a,b);             t_option(2,n_tic)=toc;
   tic; ismembc(sort(a),sort(b));  t_option(3,n_tic)=toc;
   tic; ismembc(a,sort(b));        t_option(4,n_tic)=toc;
end
fprintf(&#039;%06.3f sec (pre-sorted a and b)\n&#039;,sum(t_option(1,:)));
fprintf(&#039;%06.3f sec (ismember)\n&#039;,          sum(t_option(2,:)));
fprintf(&#039;%06.3f sec (sort(a),sort(b))\n&#039;,   sum(t_option(3,:)));
fprintf(&#039;%06.3f sec (unsorted a,sort(b))\n&#039;,sum(t_option(4,:)));
&lt;/pre&gt;

&lt;pre lang=&quot;matlab&quot;&gt;
%ML6.5
02.835 sec (pre-sorted a and b)
19.311 sec (ismember)
12.037 sec (sort(a),sort(b))
18.909 sec (unsorted a,sort(b))

%R2012b
02.415 sec (pre-sorted a and b)
14.289 sec (ismember)
05.581 sec (sort(a),sort(b))
14.176 sec (unsorted a,sort(b))

%R2018a
02.635 sec (pre-sorted a and b)
05.794 sec (ismember)
06.050 sec (sort(a),sort(b))
14.147 sec (unsorted a,sort(b))
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299787">Ramy</a>.</p>
<p>I&#8217;m sorry, I edited my code after I already pasted the code here and forgot to update the code along with the output. The remarks in the posted text still stand though. Below is a 20 iteration version along with the sum timings.</p>
<pre lang="matlab">
clc,n=2e6; a=ceil(n*rand(n,1)); b=ceil(n*rand(n,1)); d=sort(b);c=sort(a);
t_option=zeros(4,20);
for n_tic=1:size(t_option,2)
   tic; ismembc(c,d);              t_option(1,n_tic)=toc;
   tic; ismember(a,b);             t_option(2,n_tic)=toc;
   tic; ismembc(sort(a),sort(b));  t_option(3,n_tic)=toc;
   tic; ismembc(a,sort(b));        t_option(4,n_tic)=toc;
end
fprintf('%06.3f sec (pre-sorted a and b)\n',sum(t_option(1,:)));
fprintf('%06.3f sec (ismember)\n',          sum(t_option(2,:)));
fprintf('%06.3f sec (sort(a),sort(b))\n',   sum(t_option(3,:)));
fprintf('%06.3f sec (unsorted a,sort(b))\n',sum(t_option(4,:)));
</pre>
<pre lang="matlab">
%ML6.5
02.835 sec (pre-sorted a and b)
19.311 sec (ismember)
12.037 sec (sort(a),sort(b))
18.909 sec (unsorted a,sort(b))

%R2012b
02.415 sec (pre-sorted a and b)
14.289 sec (ismember)
05.581 sec (sort(a),sort(b))
14.176 sec (unsorted a,sort(b))

%R2018a
02.635 sec (pre-sorted a and b)
05.794 sec (ismember)
06.050 sec (sort(a),sort(b))
14.147 sec (unsorted a,sort(b))
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432383</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 14 Jul 2018 17:55:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-432383</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432381&quot;&gt;Rik Wisselink&lt;/a&gt;.

@Rik - your outputs don&#039;t correspond to your code, so they do not make any sense. Moreover, instead of reporting 3 separate timing instances, it would be better to report the total run-time of a loop of [say] 10-20 iterations.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432381">Rik Wisselink</a>.</p>
<p>@Rik &#8211; your outputs don&#8217;t correspond to your code, so they do not make any sense. Moreover, instead of reporting 3 separate timing instances, it would be better to report the total run-time of a loop of [say] 10-20 iterations.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rik Wisselink		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-432381</link>

		<dc:creator><![CDATA[Rik Wisselink]]></dc:creator>
		<pubDate>Sat, 14 Jul 2018 17:40:38 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-432381</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299787&quot;&gt;Ramy&lt;/a&gt;.

@Yair, unfortunately, that is the same sample data as you use in your article. If you include the sort, ismembc becomes much slower to use. Interestingly, ismember on the older releases is similar to doing a sort of b and then calling ismembc, while in R2018a it has similar timings to a double sort before a call to ismembc. So sorting your own data is worth it (even with calling sort to an already sorted array, it is still faster than ismember).

&lt;pre lang=&quot;matlab&quot;&gt;
clc,n=2e6; a=ceil(n*rand(n,1)); b=ceil(n*rand(n,1)); c=sort(b);d=sort(a);
tic;ismember(a,b);fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismember(a,b);fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismember(a,b);fprintf(&#039;%.3f sec (ismember)\n&#039;,toc);
tic;ismembc(a,sort(b));fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismembc(a,sort(b));fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismembc(a,sort(b));fprintf(&#039;%.3f sec (ismembc and sort)\n&#039;,toc);
tic;ismembc(a,c);fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismembc(a,c);fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismembc(a,c);fprintf(&#039;%.3f sec (ismembc, unsorted a)\n&#039;,toc);
tic;ismembc(d,c);fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismembc(d,c);fprintf(&#039;%.3f sec, &#039;,toc);
tic;ismembc(d,c);fprintf(&#039;%.3f sec (ismembc, sorted a)\n&#039;,toc);
&lt;/pre&gt;

On my W10x64 machine this returns the following timings:

&lt;pre lang=&quot;matlab&quot;&gt;
%ML6.5
0.137 sec, 0.139 sec, 0.138 sec (pre-sorted a and b)
0.896 sec, 0.901 sec, 0.909 sec (ismember)
0.582 sec, 0.582 sec, 0.578 sec (sort(a),sort(b))
0.865 sec, 0.862 sec, 0.866 sec (unsorted a,sort(b))

%R2012b
0.120 sec, 0.119 sec, 0.119 sec (pre-sorted a and b)
0.676 sec, 0.662 sec, 0.651 sec (ismember)
0.257 sec, 0.258 sec, 0.261 sec (sort(a),sort(b))
0.676 sec, 0.673 sec, 0.639 sec (unsorted a,sort(b))

%R2018a
0.127 sec, 0.124 sec, 0.123 sec (pre-sorted a and b)
0.249 sec, 0.248 sec, 0.256 sec (ismember)
0.287 sec, 0.272 sec, 0.289 sec (sort(a),sort(b))
0.664 sec, 0.676 sec, 0.664 sec (unsorted a,sort(b))
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299787">Ramy</a>.</p>
<p>@Yair, unfortunately, that is the same sample data as you use in your article. If you include the sort, ismembc becomes much slower to use. Interestingly, ismember on the older releases is similar to doing a sort of b and then calling ismembc, while in R2018a it has similar timings to a double sort before a call to ismembc. So sorting your own data is worth it (even with calling sort to an already sorted array, it is still faster than ismember).</p>
<pre lang="matlab">
clc,n=2e6; a=ceil(n*rand(n,1)); b=ceil(n*rand(n,1)); c=sort(b);d=sort(a);
tic;ismember(a,b);fprintf('%.3f sec, ',toc);
tic;ismember(a,b);fprintf('%.3f sec, ',toc);
tic;ismember(a,b);fprintf('%.3f sec (ismember)\n',toc);
tic;ismembc(a,sort(b));fprintf('%.3f sec, ',toc);
tic;ismembc(a,sort(b));fprintf('%.3f sec, ',toc);
tic;ismembc(a,sort(b));fprintf('%.3f sec (ismembc and sort)\n',toc);
tic;ismembc(a,c);fprintf('%.3f sec, ',toc);
tic;ismembc(a,c);fprintf('%.3f sec, ',toc);
tic;ismembc(a,c);fprintf('%.3f sec (ismembc, unsorted a)\n',toc);
tic;ismembc(d,c);fprintf('%.3f sec, ',toc);
tic;ismembc(d,c);fprintf('%.3f sec, ',toc);
tic;ismembc(d,c);fprintf('%.3f sec (ismembc, sorted a)\n',toc);
</pre>
<p>On my W10x64 machine this returns the following timings:</p>
<pre lang="matlab">
%ML6.5
0.137 sec, 0.139 sec, 0.138 sec (pre-sorted a and b)
0.896 sec, 0.901 sec, 0.909 sec (ismember)
0.582 sec, 0.582 sec, 0.578 sec (sort(a),sort(b))
0.865 sec, 0.862 sec, 0.866 sec (unsorted a,sort(b))

%R2012b
0.120 sec, 0.119 sec, 0.119 sec (pre-sorted a and b)
0.676 sec, 0.662 sec, 0.651 sec (ismember)
0.257 sec, 0.258 sec, 0.261 sec (sort(a),sort(b))
0.676 sec, 0.673 sec, 0.639 sec (unsorted a,sort(b))

%R2018a
0.127 sec, 0.124 sec, 0.123 sec (pre-sorted a and b)
0.249 sec, 0.248 sec, 0.256 sec (ismember)
0.287 sec, 0.272 sec, 0.289 sec (sort(a),sort(b))
0.664 sec, 0.676 sec, 0.664 sec (unsorted a,sort(b))
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ilya		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-354685</link>

		<dc:creator><![CDATA[Ilya]]></dc:creator>
		<pubDate>Fri, 07 Aug 2015 13:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-354685</guid>

					<description><![CDATA[If I&#039;ve understood (and tested) it correctly, Inf-padding at the end of any of the 2 input vectors should not be a problem (sometimes vectors are 0 or NaN padded to preserve certain dimensionality)...
Otherwise, a very nice post, it really helped me a lot!]]></description>
			<content:encoded><![CDATA[<p>If I&#8217;ve understood (and tested) it correctly, Inf-padding at the end of any of the 2 input vectors should not be a problem (sometimes vectors are 0 or NaN padded to preserve certain dimensionality)&#8230;<br />
Otherwise, a very nice post, it really helped me a lot!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Oleg Komarov		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-333334</link>

		<dc:creator><![CDATA[Oleg Komarov]]></dc:creator>
		<pubDate>Sun, 05 Oct 2014 16:45:41 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-333334</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-45884&quot;&gt;Rob&lt;/a&gt;.

For ismembc(), the first input needs NOT to be sorted. Follows the heuristic that tests the assertion(terminate execution with CTRL+C):

&lt;pre lang=&quot;matlab&quot;&gt; 
c = 0;
while true 
    c          = c+1;
    A          = randi(1e6,1e5,1);
    B          = sort(randi(1e6,1e3,1)); 
    [idx, pos] = ismember(A,B);
    if ~isequal(idx,ismembc(A,B))
        disp(&#039;fail&#039;)
        disp(c)
        break 
    end
end
&lt;/pre&gt;

The same holds true for ismembc2(), i.e. first input needs not to be sorted, IFF we are getting the positions under the &#039;legacy&#039; flag:
The pos output:
&lt;pre lang=&quot;matlab&quot;&gt; 
c = 0;
while true 
    c          = c+1;
    A          = randi(1e6,1e5,1);
    B          = sort(randi(1e6,1e3,1)); 
    [idx, pos] = ismember(A,B,&#039;legacy&#039;);
    if ~isequal(pos,ismembc2(A,B))
        disp(&#039;fail&#039;)
        disp(c)
        break 
    end
end
&lt;/pre&gt;

To reproduce the same pos as with ismember() in &#062;= R2012b, you do NOT need sorted A, but should have unique and sorted B.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-45884">Rob</a>.</p>
<p>For ismembc(), the first input needs NOT to be sorted. Follows the heuristic that tests the assertion(terminate execution with CTRL+C):</p>
<pre lang="matlab"> 
c = 0;
while true 
    c          = c+1;
    A          = randi(1e6,1e5,1);
    B          = sort(randi(1e6,1e3,1)); 
    [idx, pos] = ismember(A,B);
    if ~isequal(idx,ismembc(A,B))
        disp('fail')
        disp(c)
        break 
    end
end
</pre>
<p>The same holds true for ismembc2(), i.e. first input needs not to be sorted, IFF we are getting the positions under the &#8216;legacy&#8217; flag:<br />
The pos output:</p>
<pre lang="matlab"> 
c = 0;
while true 
    c          = c+1;
    A          = randi(1e6,1e5,1);
    B          = sort(randi(1e6,1e3,1)); 
    [idx, pos] = ismember(A,B,'legacy');
    if ~isequal(pos,ismembc2(A,B))
        disp('fail')
        disp(c)
        break 
    end
end
</pre>
<p>To reproduce the same pos as with ismember() in &gt;= R2012b, you do NOT need sorted A, but should have unique and sorted B.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299830</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 28 Nov 2013 08:16:32 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-299830</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299787&quot;&gt;Ramy&lt;/a&gt;.

@Ramy - I am not sure I understand - you ran the same &lt;i&gt;&lt;b&gt;ismember&lt;/b&gt;&lt;/i&gt; command several times, of course it would take a similar amount of time. If you run the same thing with &lt;i&gt;&lt;b&gt;ismembc&lt;/b&gt;&lt;/i&gt; you&#039;ll see that it&#039;s much faster. On the other hand, remember that &lt;i&gt;&lt;b&gt;ismembc&lt;/b&gt;&lt;/i&gt; must have sorted inputs, and your inputs are currently random...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299787">Ramy</a>.</p>
<p>@Ramy &#8211; I am not sure I understand &#8211; you ran the same <i><b>ismember</b></i> command several times, of course it would take a similar amount of time. If you run the same thing with <i><b>ismembc</b></i> you&#8217;ll see that it&#8217;s much faster. On the other hand, remember that <i><b>ismembc</b></i> must have sorted inputs, and your inputs are currently random&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ramy		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299787</link>

		<dc:creator><![CDATA[Ramy]]></dc:creator>
		<pubDate>Thu, 28 Nov 2013 01:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-299787</guid>

					<description><![CDATA[There is almost no difference in the new 2013b version of Matlab:
&lt;pre&gt;
&gt;&gt; n=2e6; a=ceil(n*rand(n,1)); b=ceil(n*rand(n,1));
&gt;&gt; tic;ismember(a,b);toc;
Elapsed time is 0.846894 seconds.
&gt;&gt; tic;ismember(a,b);toc;
Elapsed time is 0.817701 seconds.
&gt;&gt; tic;ismember(a,b);toc;
Elapsed time is 0.808824 seconds.
&gt;&gt; tic;ismember(a,b);toc;
Elapsed time is 0.817153 seconds.
&gt;&gt; tic;ismember(a,b);toc;
Elapsed time is 0.817318 seconds.
&gt;&gt; tic;ismember(a,b);toc;
Elapsed time is 0.810535 seconds.
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>There is almost no difference in the new 2013b version of Matlab:</p>
<pre>
>> n=2e6; a=ceil(n*rand(n,1)); b=ceil(n*rand(n,1));
>> tic;ismember(a,b);toc;
Elapsed time is 0.846894 seconds.
>> tic;ismember(a,b);toc;
Elapsed time is 0.817701 seconds.
>> tic;ismember(a,b);toc;
Elapsed time is 0.808824 seconds.
>> tic;ismember(a,b);toc;
Elapsed time is 0.817153 seconds.
>> tic;ismember(a,b);toc;
Elapsed time is 0.817318 seconds.
>> tic;ismember(a,b);toc;
Elapsed time is 0.810535 seconds.
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: sprintfc &#8211; undocumented helper function &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-299747</link>

		<dc:creator><![CDATA[sprintfc &#8211; undocumented helper function &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Wed, 27 Nov 2013 20:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-299747</guid>

					<description><![CDATA[[...] bumping into them within the m-code of standard functions. Such was the case, for example, of the ismembc function, that I described here back in 2009, and the dtstr2dtnummx function that I described in 2011. Today [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] bumping into them within the m-code of standard functions. Such was the case, for example, of the ismembc function, that I described here back in 2009, and the dtstr2dtnummx function that I described in 2011. Today [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-58796</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 06 Oct 2011 20:14:42 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=164#comment-58796</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-58773&quot;&gt;Vivien&lt;/a&gt;.

@Vivien - the preconditions required by &lt;b&gt;&lt;i&gt;ismembc&lt;/i&gt;&lt;/b&gt; were indeed mentioned in the article:

&lt;b&gt;&lt;i&gt;ismembc&lt;/i&gt;&lt;/b&gt; should not be used carelessly: as noted, its inputs must be sorted non-sparse non-NaN values. In the general case we should either ensure this programmatically (as done in &lt;b&gt;&lt;i&gt;setxor&lt;/i&gt;&lt;/b&gt;) or use &lt;b&gt;&lt;i&gt;ismember&lt;/i&gt;&lt;/b&gt;, which handles this for us.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/ismembc-undocumented-helper-function#comment-58773">Vivien</a>.</p>
<p>@Vivien &#8211; the preconditions required by <b><i>ismembc</i></b> were indeed mentioned in the article:</p>
<p><b><i>ismembc</i></b> should not be used carelessly: as noted, its inputs must be sorted non-sparse non-NaN values. In the general case we should either ensure this programmatically (as done in <b><i>setxor</i></b>) or use <b><i>ismember</i></b>, which handles this for us.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
