Least squares approximation for two circles and two lines

2 views (last 30 days)
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.

Answers (1)

Torsten
Torsten on 26 Feb 2016
Edited: Torsten on 26 Feb 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 Comments
arisish roy
arisish roy on 26 Feb 2016
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?
Torsten
Torsten on 26 Feb 2016
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.

Sign in to comment.

Categories

Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!