|
From: | marco atzeri |
Subject: | Re: fzero tolerance issue ... and a related bug |
Date: | Thu, 18 Oct 2012 20:31:14 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
On 10/18/2012 7:46 PM, Joza wrote:
So related to all that above, 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)
look for the minimum http://www.gnu.org/software/octave/doc/interpreter/Minimizers.html#Minimizers
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? So how can one solve such a simple equation with fzero?
[Prev in Thread] | Current Thread | [Next in Thread] |