Description Usage Arguments Details Value Note References See Also Examples

Find root of continuous function of one variable.

1 |

`f` |
function whose root is sought. |

`x` |
a point near the root or an interval giving end points. |

`maxiter` |
maximum number of iterations. |

`tol` |
relative tolerance. |

`...` |
additional arguments to be passed to the function. |

`fzero`

tries to find a zero of `f`

near `x`

, if `x`

is a scalar. Expands the interval until different signs are found at the
endpoints or the maximum number of iterations is exceeded.
If `x`

is a vector of length two, `fzero`

assumes `x`

is
an interval where the sign of `x[1]`

differs from the sign of
`x[1]`

. An error occurs if this is not the case.

“This is essentially the ACM algorithm 748. The structure of the algorithm has been transformed non-trivially: it implement here a FSM version using one interior point determination and one bracketing per iteration, thus reducing the number of temporary variables and simplifying the structure.”

This approach will not find zeroes of quadratic order.

`fzero`

returns a list with

`x` |
location of the root. |

`fval` |
function value at the root. |

`fzero`

mimics the Matlab function of the same name, but is translated
from Octave's `fzero`

function, copyrighted (c) 2009 by Jaroslav Hajek.

Alefeld, Potra and Shi (1995). Enclosing Zeros of Continuous Functions. ACM Transactions on Mathematical Software, Vol. 21, No. 3.

1 2 3 |

pracma documentation built on Jan. 30, 2018, 5:04 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.