Function Index
AbsDistance
AbsDistance[
{x
0
,
x
1
,
...}
,
{y
0
,
y
1
,
...}] returns the absolute distance between points {x
0
,
x
1
,
...} and {y
0
,
y
1
,
...}.
AbsDistance
[{x
0
,
x
1
,
...}
,
{{y
1,0
,
y
1,1
,
...}
,
{y
2,0
,
y
2,1
,
...}
,
...} ] returns a list of absolute distances between point {x
0
,
x
1
,
...} and list of points {{y
1,0
,
y
1,1
,
...}
,
{y
2,0
,
y
2,1
,
...}
,
...}.
AbsDistance
returns the so-called city-block distance. It is defined as
d(X,Y) =
| x
i
-y
i
|
where X={x
0
,x
1
,... x
N-1
} and Y= {y
0
,y
1
,... y
N-1
}.
See also User's Guide
7.5
.
Example
This loads the package.
In[1]:=
Here we calculate the distance between two points.
In[2]:=
Out[2]=
© 2008 Wolfram Research, Inc.
•
Terms of Use
•
Privacy Policy
Sign up for our newsletter: