Selasa, 23 November 2010

Menghitung jarak koordinat 2 titik

koordinat A(1.1) dan B(10.13)
diketahui x1=1 ; x2=10; y1=1; y2=13

maka, jaraknya (r) adalah :
a. Euclidean is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula
r = (((x2-x1)^2)+((y2-y1)^2))^1/2
r = ((10-1)^2 + (13-1)^2)^1/2
r = (81+144)^1/2 = 15

b. City-block :
r = |x2-x1|+|y2-y1| = |10-1|+|13-1| = 9+12
r = 21

c.Chessboard :
r = max (|x2-x1|,|y2-y1|) = max(|10-1|,|13-1|) = max (9,12)
r = 12

d. Mahalanobis is based on correlations between variables by which different patterns can be identified and analyzed. It is a useful way of determining similarity of an unknown sample set to a known one
r = ()

0 comments: