ManhattanDistance

ManhattanDistance[u,v]

gives the Manhattan or "city block" distance between vectors u and v.

Details

Examples

open allclose all

Basic Examples  (2)

Manhattan distance between two vectors:

In[1]:=
Click for copyable input
Out[1]=

Manhattan distance between numeric vectors:

In[1]:=
Click for copyable input
Out[1]=

Scope  (2)

Applications  (2)

Properties & Relations  (5)

See Also

EuclideanDistance  SquaredEuclideanDistance  HammingDistance  ChessboardDistance  BrayCurtisDistance  CanberraDistance  CornerNeighbors

Tutorials

Introduced in 2007
(6.0)