Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12345

Re: Euclidean distance of all pairwise combinations (redundants)

From Jesse Pisel <jessepisel@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Euclidean distance of all pairwise combinations (redundants)
Date 2012-11-15 09:04 +0000
Message-ID <k82b78$7lb$1@smc.vnet.net> (permalink)
References <20121114062906.D261769B8@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Thank you for all the suggestions everyone, all the different codes worked
well and they all did exactly what I wanted to do with my data set. Thank
you for all the help! I ended up just using Tuples instead of Subset just
for ease of use as Ralph suggested.

On Wed, Nov 14, 2012 at 5:23 AM, Sseziwa Mukasa <mukasa@gmail.com> wrote:

> Outer[EuclideanDistance[#,#]&,list,list]
>
> On Nov 14, 2012, at 1:29 AM, Jesse Pisel <jessepisel@gmail.com> wrote:
>
> > I have been having a tough time trying to figure out how to include all
> red undant pairwise combinations in my results for the euclidean distance
> between a set of points. I have a set of points with xy coordinates and
> want the euclidean distance between each point including the point and
> itself. So if my points in xy space are list = {{1, 1}, {2, 2}, {3, 3}} for
> example, I want the distance from {1, 1} to {1, 1}, {1, 1} to {2, 2}, and
> {2, 2} to {3, 3} etc. for each point for a total of 9 distances all
> together. The EuclideanDistance function removes the redundant distances
> that I want retained in the results. I have been using this code just to
> play with data but would like to be able to expand up to 500+ points:
> >
> > 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?
> >
> >
>



-- 
*Jesse Pisel*
970-901-5455
P.O. Box 18471
Golden, CO 80401

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Euclidean distance of all pairwise combinations (redundants) Jesse Pisel <jessepisel@gmail.com> - 2012-11-15 09:04 +0000

csiph-web