PRODUCTS
Mathematica
Mathematica for Students
Mathematica for the Classroom
grid
Mathematica
web
Mathematica
Mathematica Player
(free download)
Mathematica Player Pro
Wolfram
Workbench
Mathematica
Applications
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
FOR USERS
All User Resources
Product Registration
Technical Support
Customer Service
Developer Support
Does My Site Have a License?
Free Seminars
Certified Training
Custom Group Seminars
Documentation & Examples
Tutorial Screencasts
Video Gallery
Demonstrations Project
Education Portal
Student Resources
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Wolfram Blog
Mathematica Journal
Wolfram Library Archive
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
Mathematica
>
Core Language
>
String Manipulation
>
Sequence Alignment & Comparison
>
Distance and Similarity Measures
>
Mathematica
>
Data Manipulation
>
Numerical Data
>
Exploratory Data Analysis
>
Distance and Similarity Measures
>
Mathematica
>
Data Manipulation
>
Statistics
>
Exploratory Data Analysis
>
Distance and Similarity Measures
>
Built-in
Mathematica
Symbol
Partitioning Data into Clusters
Tutorials »
|
EuclideanDistance
SquaredEuclideanDistance
HammingDistance
ChessboardDistance
BrayCurtisDistance
CanberraDistance
CornerNeighbors
See Also »
|
Exploratory Data Analysis
Distance and Similarity Measures
New in 6.0: Mathematics & Algorithms
New in 6.0: Statistics
More About »
ManhattanDistance
ManhattanDistance
[
u
,
v
]
gives the Manhattan or "city block" distance between vectors
u
and
v
.
MORE INFORMATION
ManhattanDistance
[
u
,
v
]
is equivalent to
Total
[
Abs
[
u
-
v
]]
.
»
EXAMPLES
CLOSE ALL
Basic Examples
(2)
Manhattan distance between two vectors:
In[1]:=
Out[1]=
Manhattan distance between numeric vectors:
In[1]:=
Out[1]=
Scope
(2)
Applications
(2)
Properties & Relations
(5)
SEE ALSO
EuclideanDistance
SquaredEuclideanDistance
HammingDistance
ChessboardDistance
BrayCurtisDistance
CanberraDistance
CornerNeighbors
TUTORIALS
Partitioning Data into Clusters
MORE ABOUT
Exploratory Data Analysis
Distance and Similarity Measures
New in 6.0: Mathematics & Algorithms
New in 6.0: Statistics
RELATED LINKS
Demonstrations with ManhattanDistance
(
Wolfram Demonstrations Project
)
New in 6
© 2008 Wolfram Research, Inc.