Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
fsolve for multiple solution

Subject: fsolve for multiple solution

From: kamuran turksoy

Date: 6 Aug, 2012 21:34:25

Message: 1 of 5

Hi everybody

I have a bunch of circles and want to find the intersection point of them. I used fsolve to solve system of nonlinear equation, however fsolve gives me just one intersection point. Is there any way to make fsolve (or fmicon) to give multiple solution.

I thought that i can give different initial guess and put in a for loop to get different solutions but i do not know in how many point circles are intersect. Furthermore i was not sure whether solver converges different solution for different initial guess.

(x-x0)^2+(y-y0)^2=R^2 is equation for circles and for all circles x0, y0 and R are known.


Any suggestion for my problem?

Subject: fsolve for multiple solution

From: John D'Errico

Date: 6 Aug, 2012 22:04:37

Message: 2 of 5

"kamuran turksoy" <kamuranturksoy@gmail.com> wrote in message <jvpd91$irm$1@newscl01ah.mathworks.com>...
> Hi everybody
>
> I have a bunch of circles and want to find the intersection point of them. I used fsolve to solve system of nonlinear equation, however fsolve gives me just one intersection point. Is there any way to make fsolve (or fmicon) to give multiple solution.
>
> I thought that i can give different initial guess and put in a for loop to get different solutions but i do not know in how many point circles are intersect. Furthermore i was not sure whether solver converges different solution for different initial guess.
>
> (x-x0)^2+(y-y0)^2=R^2 is equation for circles and for all circles x0, y0 and R are known.
>
>
> Any suggestion for my problem?

Well, you already know the problem, and the answer. There
is no magic to be found here.

fsolve returns a SINGLE solution, dependent on the starting
guess. Different guesses MAY return different results, or the
same result, to within a tolerance.

You can use my rmsearch from the FEX, but all it does in this
case is help you to generate the various guesses and wraps
a loop around the solver.

You will still need to do the clustering to resolve into unique
points those solutions that came from different starting
values.

John

Subject: fsolve for multiple solution

From: Bruno Luong

Date: 6 Aug, 2012 22:10:44

Message: 3 of 5

"kamuran turksoy" <kamuranturksoy@gmail.com> wrote in message <jvpd91$irm$1@newscl01ah.mathworks.com>...

> Any suggestion for my problem?

Sure, intersection of circles can be computed with formula. Why bother with fsolve?

Bruno

Subject: fsolve for multiple solution

From: Andrew O'Connor

Date: 7 Aug, 2012 11:14:16

Message: 4 of 5

For numerical solution I've used Matt Fig's file here which returns multiple solutions and is insensitive to the initial guess.

http://www.mathworks.com/matlabcentral/fileexchange/6924-newtzero

Subject: fsolve for multiple solution

From: kamuran turksoy

Date: 12 Aug, 2012 21:08:06

Message: 5 of 5

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jvpfd4$qdp$1@newscl01ah.mathworks.com>...
> "kamuran turksoy" <kamuranturksoy@gmail.com> wrote in message <jvpd91$irm$1@newscl01ah.mathworks.com>...
>
> > Any suggestion for my problem?
>
> Sure, intersection of circles can be computed with formula. Why bother with fsolve?
>
> Bruno

Actually i made an approximation and tried to describe my problem with equalities. But now i see it the approximation does not work. The original problem is with inequalities. So have bunch of circle area (nonlinear inequalities) then i want to find the intersection of these inequalities. Any suggestion or any matlab function that can to this?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us