distPoint2circle
Distance between a set of points to a set of circles
Contents
Syntax
- distMat=distPoint2circle(points, circles)
Description
distMat=distPoint2circle(points, circles) returns the distance matrix between a set of points and a set of circles
- points: A set of points, with each column being a point
- circles: A set of circles, with each column being a circle (center and radius)
- distMat: The returned distance matrix
Example
points=[1 2; 3 4; 2 5; 3 6]'; circles=[1 3 4; 2 5 3; 2 6 5]'; distMat=distPoint2circle(points, circles); disp('points='); disp(points); disp('circles='); disp(circles); disp('distMat='); disp(distMat);
points=
1 3 2 3
2 4 5 6
circles=
1 2 2
3 5 6
4 3 5
distMat=
3.0000 0.1623 0.8769
1.7639 1.5858 2.7639
1.7639 3.0000 4.0000
0.3944 1.5858 4.0000