MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Distance from point to set

  • To: mathgroup at
  • Subject: [mg55338] Re: Distance from point to set
  • From: "Steve Luttrell" <steve_usenet at>
  • Date: Sat, 19 Mar 2005 04:46:32 -0500 (EST)
  • References: <d1eblq$ek7$>
  • Sender: owner-wri-mathgroup at

Here is how you would define a function to do this for a Euclidean distance 


More generally you could pass a 3rd argument to this function to specify a 
function for measuring distance:


Try out this function (the 2 argument version):


Steve Luttrell

"Piotr Kowalski" <pkowalsk at> wrote in message 
news:d1eblq$ek7$1 at
> Hello,
> I would like to compute distance d(x,A) from a point 'x' to a set 'A',
> (all in R^n, where n=2 or n=3) that is:
>   d(x,A) = min ||x - a|| (forall a in A)
>   where: n=2 or n=3,
>          x is point in R^n, A is subset of R^n
>          ||  || is norm (euclidean, max, etc).
> Can I find Mathematica function or package for such problem ?
> Thank you in advance,
> P. Kowalski

  • Prev by Date: Re: Normal Disappear Problem
  • Next by Date: Re: Multiple > and < calculations [great than & less than]
  • Previous by thread: Re: Distance from point to set
  • Next by thread: Re: Distance from point to set