Description Usage Arguments Value Examples
This function finds the number of roots for a given numeric function in a specified domain. It returns the number of roots, positions of the roots and two corresponding intervals containing each root and corresponding function value, respectively. A finer domain discretization will result in more accurate intervals for both a root and corresponding function value. If the user defined function does not intersect x axis, 0 root will be returned.
1 | nroots(fn, x)
|
fn |
a numeric function defined by the user. An object which is not a numeric function will not be allowed. |
x |
a numeric vector indicating the domain of the numeric function. |
n |
the number of roots in the domain. |
position |
the position of the root in the domain. The position will change if a different domain is specified. |
range |
two intervals containing the roots and corresponding values of the functions evaluated at those roots. |
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.