function d = distanza(P1,P2)


x1 = P1(1);
y1 = P1(2);

x2 = P2(1);
y2 = P2(2);

d = sqrt((x1-x2)^2+(y1-y2)^2);