<?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: More Ways to Find Matching Data</title>
	<atom:link href="http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Thu, 09 Feb 2012 04:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Slart</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32873</link>
		<dc:creator>Slart</dc:creator>
		<pubDate>Tue, 03 Jan 2012 17:57:34 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32873</guid>
		<description>Ahh well there could be multiple matches for column 1 but then the column 2 would probably be different there should only be one match where both 1 and 2 match the same for both which would indicate an exact coordinate match. If that makes sense.</description>
		<content:encoded><![CDATA[<p>Ahh well there could be multiple matches for column 1 but then the column 2 would probably be different there should only be one match where both 1 and 2 match the same for both which would indicate an exact coordinate match. If that makes sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren Shure</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32872</link>
		<dc:creator>Loren Shure</dc:creator>
		<pubDate>Tue, 03 Jan 2012 17:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32872</guid>
		<description>Slart-

Didn&#039;t realize you were expecting possibly mulitple matches.

--Loren</description>
		<content:encoded><![CDATA[<p>Slart-</p>
<p>Didn&#8217;t realize you were expecting possibly mulitple matches.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slart</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32871</link>
		<dc:creator>Slart</dc:creator>
		<pubDate>Tue, 03 Jan 2012 17:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32871</guid>
		<description>Hmm note sure how unique could help as I need every occurance not just he first and last.  I really need to be able to find where in A the corresponding two values from B occur. I.E. matching both the first column and the second for an exact coordinate match.

Could you elaborate on how you think unique could help?</description>
		<content:encoded><![CDATA[<p>Hmm note sure how unique could help as I need every occurance not just he first and last.  I really need to be able to find where in A the corresponding two values from B occur. I.E. matching both the first column and the second for an exact coordinate match.</p>
<p>Could you elaborate on how you think unique could help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren Shure</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32870</link>
		<dc:creator>Loren Shure</dc:creator>
		<pubDate>Tue, 03 Jan 2012 17:04:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32870</guid>
		<description>Slart-

Exact equality for floating point numbers is very iffy.  You will need to build in a tolerance test.

Could you use unique looking for rows somehow with 3 outputs A and B? 

--Loren</description>
		<content:encoded><![CDATA[<p>Slart-</p>
<p>Exact equality for floating point numbers is very iffy.  You will need to build in a tolerance test.</p>
<p>Could you use unique looking for rows somehow with 3 outputs A and B? </p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slart</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32869</link>
		<dc:creator>Slart</dc:creator>
		<pubDate>Tue, 03 Jan 2012 16:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32869</guid>
		<description>Ok read thru this several times as it seems appropriate to my problem, however ismember does not take into account the duplicates and I need these to be true also.

I have A= 80,000x2  i.e. 

[275.0919,-13.6656;275.1045,-13.8508...... ]

and    B= 10,000x2 i.e. 

[275.1045,-13.8508;.... ]


and need to find every occurance where the value in B occurs in A prefereable with the index for both included. My task is then to compare other values relating to these indexes in other arrays. These are actually coordinates and I need the ones that match in both, but there could always be a slight difference maybe the last decimal that would still need to be accepted.  This sounds simple to do in my head and I am not a MATLAB expert by any means so any help in simple English would help. Thanks.</description>
		<content:encoded><![CDATA[<p>Ok read thru this several times as it seems appropriate to my problem, however ismember does not take into account the duplicates and I need these to be true also.</p>
<p>I have A= 80,000&#215;2  i.e. </p>
<p>[275.0919,-13.6656;275.1045,-13.8508...... ]</p>
<p>and    B= 10,000&#215;2 i.e. </p>
<p>[275.1045,-13.8508;.... ]</p>
<p>and need to find every occurance where the value in B occurs in A prefereable with the index for both included. My task is then to compare other values relating to these indexes in other arrays. These are actually coordinates and I need the ones that match in both, but there could always be a slight difference maybe the last decimal that would still need to be accepted.  This sounds simple to do in my head and I am not a MATLAB expert by any means so any help in simple English would help. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32536</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Sat, 08 Oct 2011 16:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32536</guid>
		<description>Mahbub-

Welcome to the world of floating point arithmetic.  The numbers you are printing out are not the full picture.  If you use format long, you would likely see differences between the first 2 entities in your vector.  == is only true if the numbers are non NaN, and are bitwise exactly equal.  It&#039;s much better to allow a tolerance when comparing floating point numbers.  If you look through the blog for items with category numerical accuracy, you should see several relevant posts.

--Loren</description>
		<content:encoded><![CDATA[<p>Mahbub-</p>
<p>Welcome to the world of floating point arithmetic.  The numbers you are printing out are not the full picture.  If you use format long, you would likely see differences between the first 2 entities in your vector.  == is only true if the numbers are non NaN, and are bitwise exactly equal.  It&#8217;s much better to allow a tolerance when comparing floating point numbers.  If you look through the blog for items with category numerical accuracy, you should see several relevant posts.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahbub</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32535</link>
		<dc:creator>Mahbub</dc:creator>
		<pubDate>Sat, 08 Oct 2011 12:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-32535</guid>
		<description>hi, I have an vector like x=[0.2000 0.2000 0.7375 1.0000 1.8125 2.0000 2.8875 3.0000 3.9625 4.0000 4.5000 4.5000]

unique does not stop repition of 0.2000 in this case.But in another similar case of 0.2000, it stops repetition.What is the solution</description>
		<content:encoded><![CDATA[<p>hi, I have an vector like x=[0.2000 0.2000 0.7375 1.0000 1.8125 2.0000 2.8875 3.0000 3.9625 4.0000 4.5000 4.5000]</p>
<p>unique does not stop repition of 0.2000 in this case.But in another similar case of 0.2000, it stops repetition.What is the solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-31921</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 17 Dec 2010 12:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-31921</guid>
		<description>Sudeera-

Why so complicated?  You can just do

&lt;pre class=&quot;code&quot;&gt;

[row, col] = find(A==value)
&lt;/pre&gt;

no ismember needed...

--Loren</description>
		<content:encoded><![CDATA[<p>Sudeera-</p>
<p>Why so complicated?  You can just do</p>
<pre class="code">

[row, col] = find(A==value)
</pre>
<p>no ismember needed&#8230;</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudeera Jayasekara</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-31920</link>
		<dc:creator>Sudeera Jayasekara</dc:creator>
		<pubDate>Fri, 17 Dec 2010 02:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-31920</guid>
		<description>The following code finds the specified value in A and gives its location,
&lt;pre&gt;
A = [11 22 34 56 89
23 44 11 20 66
79 54 32 17 89
11 66 21 45 90];


value = 22; %value to be searched

[row,col]=find(ismember(A,[value]))
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>The following code finds the specified value in A and gives its location,</p>
<pre>
A = [11 22 34 56 89
23 44 11 20 66
79 54 32 17 89
11 66 21 45 90];

value = 22; %value to be searched

[row,col]=find(ismember(A,[value]))
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: boris</title>
		<link>http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-31529</link>
		<dc:creator>boris</dc:creator>
		<pubDate>Fri, 23 Jul 2010 16:05:41 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/01/20/more-ways-to-find-matching-data/#comment-31529</guid>
		<description>Great solution with ismember, thank&#039;s Loren this is a wonderful time saver!
Boris</description>
		<content:encoded><![CDATA[<p>Great solution with ismember, thank&#8217;s Loren this is a wonderful time saver!<br />
Boris</p>
]]></content:encoded>
	</item>
</channel>
</rss>

