Description Usage Arguments Details Value Examples
This function returns the root (or two roots) of
the equation ky*y + kx2*x^2 + kx*x + kk = 0.
When dx is not null, it is supposed to give
the interval where the root lies, in that case only
one root is returned.
The first parameter can be a vector of any
length and all computations are vectorized.
Only real roots are considered.
1 2 |
solve8quadratic(y,ky,kx2,kx,kk,dx=NULL,x0=NULL,monitor=rbsa0$monitor$v)
|
y |
Vector of values for which the equation must be satisfied. |
ky |
Coefficient for |
kx2 |
Coefficient for |
kx |
Coefficient for |
kk |
Constant coefficient. |
dx |
|
x0 |
|
monitor |
List of constants indicating the monitoring choices, see the |
When dx is defined only one root is returned,
belonging to the interval; if it is not possible (root(s)
exist(s) and do(es) not comply) a fatal error
is issued.
When every real number complies with the equation, according
to available arguments, the returning value is x0,
mean(dx) or 0.
When is.null(dx) either one or two roots is
returned with NA when the solution is complex.
A matrix having one or two columns according to the values of
ky,kx2,kx,kk,dx.
1 2 3 4 |
solve8quadratic(1:10, 1,1,0,-20);
solve8quadratic( 3,-1,1,1, 1);
solve8quadratic( 3,-1,1,1, 1,c(0.5,1.5));
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.