MathGroup Archive 2012

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

Search the Archive

Re: Euclidean distance of all pairwise combinations (redundants)


On 11/14/2012 12:33 AM, Jesse Pisel wrote:
>
> list = {{1, 1}, {2, 2}, {3, 3}}
> EuclideanDistance @@@ Subsets[list, {2}]
>
> Any ideas on how to get the euclidean distance between all the points
>including redundants and self references?
>
>

may be

------------------
list = {{1, 1}, {2, 2}, {3, 3}}
EuclideanDistance @@@ Tuples[list, 2]
-----------------


{0,Sqrt[2],2 Sqrt[2],Sqrt[2],0,Sqrt[2],2 Sqrt[2],Sqrt[2],0}
  
--Nasser



  • Prev by Date: Re: Euclidean distance of all pairwise combinations (redundants)
  • Next by Date: improving speed of simulation using random numbers
  • Previous by thread: Re: Euclidean distance of all pairwise combinations (redundants)
  • Next by thread: Re: Euclidean distance of all pairwise combinations (redundants)