x = fzero(fun, x0)
[x, fval, exitflag, output] = fzero(fun, x0, options)
x = fzero(problem)
| Parameter | Description |
|---|---|
| fun | scalar function. |
| x0 | initial scalar value or two-point bracketing interval. |
| options | solver options. |
| Parameter | Description |
|---|---|
| x | estimated zero. |
| fval | function value at x. |
| exitflag | termination indicator. |
| output | diagnostics. |
fzero uses a Brent-Dekker bracketing method. If x0 is scalar, Nelson searches a sign-changing interval around it. A problem structure can contain objective, x0 and options fields.
[x, fval] = fzero(@(x) x^2 - 4, [0 5])
| Version | Description |
|---|---|
| 2.0.0 | initial version |