On Thu, Oct 18, 2012 at 2:20 PM, Joza
<address@hidden> wrote:
I felt this was important enough to give it its own thread...
Using fzero, how does one find the root of a function that is always
positive, or zero, but never negative? For instance, an absolute value:
f(x) = abs(x - 2)
This has root = 2, but I can't give it an initial bracket [x1,x2] since
f(x2)*f(x2) >= 0.
Indeed, how could fzero even find an initial bracket?
In a particular problem I am dealing with, I must find the root of f(x) =
abs(x-9.1)^4.5 using fzero, and I am supplied with initial x values of 8.0
and 13.0.
But fzero fails if I pass these values as an initial bracket, and passing
only one of them fails also. Is it impossible to solve such functions using
fzero?
--
View this message in context: http://octave.1599824.n4.nabble.com/Fzero-for-functions-that-are-never-negative-tp4645439.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave