Hello, Pls some one should help.
I want to find a minimum distance between set of points.
suppose there are 3 points, p1(xi,y1), p2(x2,y2) and p3(x3,y3).
I want to find the following distances and select the least among them:
distance1= distance from p1 to p2 + distance from p2 to p3
distance2=distance from p2 to p3 + distance from p3 to p1
distance3=distance from p3 to p1 + distance from p1 to p2
I used the ffg code but im getting an error msg
d(i)=sqrt( (x(i) - x(i+1) ).^2 + (y(i) - y(i+1) ).^2 )
As expected, I got an error msg. I guess using two (2) for loops will accomplish the task, but couldnt figure-out the appropraite syntax.