Find a zero of a univariate function.
fun is a function handle, inline function, or string containing the name of the function to evaluate.
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.
options is a structure specifying additional options. Currently,
fzero
recognizes these options:
"FunValCheck"
, "OutputFcn"
, "TolX"
,
"MaxIter"
, "MaxFunEvals"
.
For a description of these options, see ‘optimset’.
On exit, the function returns x, the approximate zero point and fval, the function value thereof.
info is an exit flag that can have these values:
output is a structure containing runtime information about the
fzero
algorithm. Fields in the structure are:
See also: optimset, fsolve.
Package: octave