roots | R Documentation |
Search multiple roots of 1D function, sampled/splitted by a (1D) mesh
roots( f, interval, maxerror_f = 1e-07, split = "seq", split.size = 11, tol = .Machine$double.eps^0.25, ... )
f |
Function to find roots |
interval |
bounds to inverse in |
maxerror_f |
the maximum error on f evaluation (iterates over uniroot to converge). |
split |
function or "unif" or "seq" (default) to preform interval partition |
split.size |
number of parts to perform uniroot inside |
tol |
the desired accuracy (convergence tolerance on f arg). |
... |
additional named or unnamed arguments to be passed to f. |
array of x, so f(x)=target
roots(sin,interval=c(pi/2,5*pi/2)) roots(sin,interval=c(pi/2,1.5*pi/2)) f=function(x)exp(x)-1; f(roots(f,interval=c(-1,2))) f=function(x)exp(1000*x)-1; f(roots(f,interval=c(-1,2)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.