small_step_root | R Documentation |
This function returns roots of a focal function by checking the sign change in each step.
small_step_root(func, step, ...)
func |
the function for which the root is sought. |
step |
a vector containing the step values |
... |
optional arguments to be passed to "func" |
data.frame with two col, "lower" and "upper" which are the range of the solutions. root
f = function(x,y){return(x*x-y*x)}
ans = small_step_root(f, seq(-2,2,length=41),y=1.333)
# ans == data.frame("lower"=c(0.0,1.3),"upper"=c(0.0,1.4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.