How can I plot a circle use given point?

20 views (last 30 days)
Seong-Won Ham
Seong-Won Ham on 25 Jan 2021
Commented: weikang zhao on 25 Jan 2021
I want to plot a circle, use given data.
but, I just know the some of the point in circle, but do not midpoint and radius.
Then, How Can I plot the circle using a given point?

Answers (2)

KSSV on 25 Jan 2021
If you have can find the radius of circle. It depends on how many points you know.
Frame the distance formula and solve the equations.

weikang zhao
weikang zhao on 25 Jan 2021
If you have coordinates of three points, the radius and center of the circle can be obtained by solving a positive definite equation set. If you have more points, there will be a overdetermined set, the midpoint and radius have a least squares estimation.
weikang zhao
weikang zhao on 25 Jan 2021
give you a demo:
c=[5;5];%real coordinate of midpoint
r=3;%real radius
pointNum=20;%num of all the points
xytrain=c+[rtrain.*cos(thetatrain);rtrain.*sin(thetatrain)];%Generate a set of points perturbed around the circle
rhat=sqrt(est(1)^2/4+est(2)^2/4+est(3));%LS estimate of radius
xhat=est(1)/2;%LS estimate of the x coordinate of midpoint
yhat=est(2)/2;%LS estimate of the y coordinate of midpoint
hold on;
If you are interested in mathematical principles, email me. my email address

Sign in to comment.



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by