Finds many (all) roots of one equation within an interval
The function uniroot_all searches the interval from lower to upper for several roots of a function f with respect to its first argument.
uniroot_all( f, interval, lower = min(interval), upper = max(interval), tol = .Machine$double.eps^0.2, maxiter = 1000, trace = 0, n = 100, ... )
f
: the function for which the root is sought. This function needs to accept a vector of input values.interval
: a vector containing the end-points of the interval to be searched for the root.lower
: the lower end point of the interval to be searched.upper
: the upper end poitn of the interval to be searched.tol
: the desired accuracy (convergence tolerance). Passed to function uniroot
.trace
: integer numberl if positive, tracing information is produced. Higher values giving more details. Passed to function uniroot
.n
: number of subintervals in which the root is sought....
: additional named or unnamed arguments to be passed to f
(but beware of parital matching to other arguments).a vector with the roots found in the interval.
this is a copy taken from the package rootSolve
but imported here to avoid dependency
uniroot
Karline Soetaert karline.soetaert@nioz.nl - original . Copied by Simon Bond.
Useful links