help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bracketing Issues with fzero


From: Fabio Somenzi
Subject: Re: Bracketing Issues with fzero
Date: Sat, 27 Mar 2010 22:55:32 -0600

Thanks for the suggestions!

On Sat, Mar 27, 2010 at 3:21 AM, Jaroslav Hajek <address@hidden> wrote:
>
> I see fzero was breaking down in the (rare) case when the bracketing
> included an exact root; got that fixed. I also improved the docstring
> for fzero so that it explains that a bracketing is expected (i.e. both
> a below-zero and above-zero point).
> If you supply just a single point (which you do in your script), fzero
> tries to determine the bracketing, but if it fails, it ends in an
> error because the algorithm can't continue.
> For most functions, bracketing the root is trivial. If it can't be
> done (function is almost always positive or always negative), consider
> using fminbnd instead and search for a minimum/maximum.
>
> I should also note that your f function appears to be a cubic
> polynomial in s; hence, it may be a much better idea to find the root
> using "roots".
>
> hth
>
>
> --
> RNDr. Jaroslav Hajek, PhD
> computing expert & GNU Octave developer
> Aeronautical Research and Test Institute (VZLU)
> Prague, Czech Republic
> url: www.highegg.matfyz.cz
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]