how to find distance of two points in matlab code example Example: two point distance matlab >> x = [0 0]; >> y = [2 1]; >> norm(x-y) ans = 2.2361