comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Better Root Finder
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Better Root Finder [message #53392 is a reply to message #53390] Sun, 15 April 2007 13:41 Go to previous messageGo to previous message
jschwab@gmail.com is currently offline  jschwab@gmail.com
Messages: 30
Registered: December 2006
Member
On Apr 15, 12:55 am, "Max Watson" <max...@gmail.com> wrote:
> IDL's fx_root seems very limited; when I want to find the root of say
> x^3 - 8 with the initial guess vector [-1,-100,100], IDL returns a
> complex number: ( -1.00000, 1.73205). Is there a way that
> fx_root can be easily modified so that it can find the right answer
> with a bad initial guess?

I wouldn't say that fx_root is limited from that example; it is
finding (one of) the correct (complex) solutions.

If you are only solving polynomial equations and need to get all the
real solutions, you could try fz_roots, which gives you all of the
solutions to a given polynomial. Then pick off the real solutions, or
whatever your desired "right answer" is.

I wouldn't say that's necessarily the best solution, but it's
certainly one of the easiest.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: 3D congrid without interpolation
Next Topic: IDL crash without warning

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 19:44:06 PDT 2025

Total time taken to generate the page: 0.01312 seconds