MathGroup Archive 2006

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

Search the Archive

Custom distance function

  • To: mathgroup at
  • Subject: [mg72092] Custom distance function
  • From: bentheo at
  • Date: Mon, 11 Dec 2006 04:55:29 -0500 (EST)

\!\(wcity[A_, B_]\  := \ â??\+\(i =
1\)\%7\((weights[\([i]\)]*\((Abs[A[\([i]\)] \
- B[\([i]\)]])\))\)\)

I was wondering if anyone could lend me a hand with a problem I'm
having. I'm trying to use the standard clusteranalysis package with
Mathematica. Now, I've defined a new distance function, which is
essentially the standard manhattan distance function, but it uses
weights. The function works on lists, and the documentation leads me to
believe it is a legit function, but when I try to use it i get
DistanceMatrix::optx: "Unknown option DistanceFuntion in \
\!\(DistanceMatrix[{{226.3382425`, 0.286908795`, \[LeftSkeleton]4\
\[RightSkeleton], 0.742291389`}, \[LeftSkeleton]9\[RightSkeleton], \
\[LeftSkeleton]1\[RightSkeleton]]\). \!\
\( \*ButtonBox[\(Moreâ?¦\), ButtonData:>\"General::optx\", \
ButtonStyle->\"RefGuideLinkText\", ButtonFrame->\"None\"]\)

Any ideas what I'm doing wrong?

  • Prev by Date: Re: SphericalPlot3D
  • Next by Date: Function of several variables
  • Previous by thread: Slow Help Browser
  • Next by thread: Re: Custom distance function