Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fsolve for multiple solution

444 views
Skip to first unread message

kamuran turksoy

unread,
Aug 6, 2012, 5:34:25 PM8/6/12
to
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?

John D'Errico

unread,
Aug 6, 2012, 6:04:37 PM8/6/12
to
"kamuran turksoy" <kamuran...@gmail.com> wrote in message <jvpd91$irm$1...@newscl01ah.mathworks.com>...
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

Bruno Luong

unread,
Aug 6, 2012, 6:10:44 PM8/6/12
to
"kamuran turksoy" <kamuran...@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

Andrew O'Connor

unread,
Aug 7, 2012, 7:14:16 AM8/7/12
to
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

kamuran turksoy

unread,
Aug 12, 2012, 5:08:06 PM8/12/12
to
"Bruno Luong" <b.l...@fogale.findmycountry> wrote in message <jvpfd4$qdp$1...@newscl01ah.mathworks.com>...
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?
0 new messages