Search All of the Math Forum:

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

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

 Messages: [ Previous | Next ]
 Bob Hanlon Posts: 906 Registered: 10/29/11
Re: Euclidean distance of all pairwise combinations (redundants)
Posted: Feb 1, 2013 1:16 AM

It isn't clear what form you want the output to take

list1 = Array[a, {3, 3}];

list2 = Array[b, {2, 3}];

list3 = Outer[Norm[#1 - #2] &, list1, list2, 1]

or

list3 // Flatten

Bob Hanlon

On Thu, Jan 31, 2013 at 8:47 PM, <vasiliadesmixalis@gmail.com> wrote:
> 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...
>

Date Subject Author
11/14/12 Jesse Pisel
11/15/12 Nasser Abbasi
11/18/12 Ray Koopman
2/1/13 Francisco Gutierrez
2/1/13 Ray Koopman
2/1/13 Bob Hanlon