Hi,
I am really stuck trying to figure out how to fit a circle to some data points. I have watched plenty of videos on the topic but do not really understand. Could you please explain to me in the most simple way how to plot some random data points, for example x = [2; 3; -2; 1]; and y = [3; 2; 4; -1];, in matlab?
I have only come up with the following but do not know how to proceed:
x = [2; 3; -2; 1];y = [3; 2; 4; -1];N = length(x);% circle's equation x^2+y^2 = 2xc1+2yc2+c3
X = [ones(N,3),x];Y=y;phi = inv(X'*X)*X'*Yplot(x,y,'*')
Thanks alot in advance!
Best Answer