Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Euclidean distance of all pairwise combinations (redundants)
Replies: 7   Last Post: Feb 1, 2013 1:16 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,606
Registered: 2/7/05
Re: Euclidean distance of all pairwise combinations (redundants)
Posted: Nov 15, 2012 4:07 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.