MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to identify "intersections" between to data sets?


Doug,

In[12]:=
Set1 ={{1.01,5},{2.1,4},{4.3,4}};
Set2 ={{1.02,4},{3,8},{4.305,8}};
err=0.15;  (*
  two numbers are considered equal if they are within err of one
another *)
In[15]:=
Intersection[Set1,Set2,SameTest->(Abs[First[#1]-First[#2]]<err&)]
Out[15]=
{{1.01,5},{4.3,4}}
In[16]:=
(* Extract the x values if you like  *)
%[[All,1]]
Out[16]=
{1.01,4.3}

dkr


  • Prev by Date: Problem with using /.
  • Next by Date: Please help: How to use Mathematica to get Parametric solution for a transcendental equation?
  • Previous by thread: How to identify "intersections" between to data sets?
  • Next by thread: RE: How to identify "intersections" between to data sets?