Re: Euclidean distance of all pairwise combinations (redundants)

• To: mathgroup at smc.vnet.net
• Subject: [mg129638] Re: Euclidean distance of all pairwise combinations (redundants)
• From: Ray Koopman <koopman at sfu.ca>
• Date: Fri, 1 Feb 2013 01:16:34 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net
• References: <k7ve05\$s08\$1@smc.vnet.net> <kef6p5\$k96\$1@smc.vnet.net>

```On Jan 31, 5:46 pm, vasiliadesmixa... at 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...

Partition[Norm/@Plus@@Transpose@Tuples@{list1,-list2},Length@list2]

{{1, Sqrt[5]}, {1, Sqrt[5]}, {Sqrt[13], Sqrt[5]}}

```

• Prev by Date: Re: Euclidean distance of all pairwise combinations (redundants)
• Next by Date: Re: Euclidean distance of all pairwise combinations (redundants)
• Previous by thread: Re: Euclidean distance of all pairwise combinations (redundants)
• Next by thread: Re: Euclidean distance of all pairwise combinations (redundants)