[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53583] fzero inaccurate result for Bessel fun
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53583] fzero inaccurate result for Bessel function |
Date: |
Sat, 7 Apr 2018 16:48:03 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #53583 (project octave):
Status: None => Works For Me
_______________________________________________________
Follow-up Comment #1:
The initial guess should be a 2-element vector which brackets the zero you are
trying to find. Try 'help fzero'
X0 should be a two-element vector specifying two points which
bracket a zero. In other words, there must be a change in sign of
the function between X0(1) and X0(2). More mathematically, the
following must hold
sign (FUN(X0(1))) * sign (FUN(X0(2))) <= 0
If X0 is a single scalar then several nearby and distant values are
probed in an attempt to obtain a valid bracketing. If this is not
successful, the function fails.
If you give it a single scalar then it has to try and find a bracketing range
around the point given and it may discover a range which includes another
zero.
If you bracket the zero you want to find there is no issue
fzero(@(x) besselj(0, x), [33 35])
ans = 33.776
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53583>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/