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 ]
Francisco Gutierrez

Posts: 100
Registered: 5/31/05
Re: Euclidean distance of all pairwise combinations (redundants)
Posted: Feb 1, 2013 1:15 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


One way would be with Outer. Simply take care of plugging in the level at which you want the operation performed.lista1={{1,1,1},{1,3,1},{3,2,4}}
lista2={{1,2,1},{1,2,3}}

Outer[EuclideanDistance,lista1,lista2,1]


Note the 1 at the end, for level 1.



Ouput: {{1,Sqrt[5]},{1,Sqrt[5]},{Sqrt[13],Sqrt[5]}}
Francisco



________________________________

From: "vasiliadesmixalis@gmail.com" <vasiliadesmixalis@gmail.com>
Sent: Thursday, January 31, 2013 8:47 PM
Subject: Re: Euclidean distance of all pairwise combinations (redundants)

Hi,

I am wondering on how to get the euclidean distance between all the point from two different list .

For example : list1=[{1,1,1},{1,3,1},{3,2,4}] , list2=[{1,2,1},{1,2,3}] etc.

how to find the euclidean comparing all the pairs ?? {1,1,1} with {1,2,1} and then {1,1,1} with {1,2,3} etc...




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.