WLJS LogoWLJS Notebook

ManhattanDistance

ManhattanDistance[u, v] gives the Manhattan or "city block" distance between vectors u and v.

Examples

ManhattanDistance[{0, 0}, {3, 4}]
(* 7 *)
ManhattanDistance[{1, 2, 3}, {4, 5, 6}]
(* 9 *)

Please visit the official Wolfram Language Reference for more details.

On this page