Least squares approximation for two circles and two lines

Can anyone please tell me how to do a least squares approximation for two circles and two(or one) line to find their approximate intersection point? Thank you.

Réponses (1)

Torsten
Torsten le 26 Fév 2016
Modifié(e) : Torsten le 26 Fév 2016
Use fmincon to solve the optimization problem
min: sqrt((x*-x1*)^2+(y*-y1*)^2)+sqrt((x*-x2*)^2+(y*-y2*)^2)+sqrt((x*-x3*)^2+(y*-y3*)^2)+sqrt((x*-x4*)^2+(y*-y4*)^2)
under the constraints
(x1*-x1)^2+(y1*-y1)^2=R1^2
(x2*-x2)^2+(y2*-y2)^2=R2^2
x3*=x3+lambda*l_x3
y3*=y3+lambda*l_y3
x4*=x4+mu*l_x4
y4*=y4+mu*l_y4
Here,
x1,y1,R1,x2,y2,R2,x3,l_x3,y3,l_y3,x4,l_x4,y4,l_y4
are known parameters and
x1*,y1*,x2*,y2*,x3*,y3*,x4*,y4*,lambda, mu, x*,y*
are the unknowns to be solved for.
(x*,y*) will be the approximate intersection point.
Best wishes
Torsten.

2 commentaires

Thank you for the solution but can you please tell me what lambda and mu are? (x1*-x1)^2+(y1*-y1)^2=R1^2 (x2*-x2)^2+(y2*-y2)^2=R2^2 are circle equations but I can't understand what lambda and mu are? Are they derived from line equations? My lines are of the form y=mx+b. Can you please tell me how to derive the parameters from that?
Then replace constraints (3-6) by
y3*=m1*x3*+b1
y4*=m2*x4*+b2
and remove lambda and mu from the list of unknowns.
Best wishes
Torsten.

Connectez-vous pour commenter.

Commenté :

le 26 Fév 2016

Community Treasure Hunt

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

Start Hunting!

Translated by