Description Usage Arguments Details Value References See Also Examples
Solve method, for CHS objects.
1 2 |
a |
A CHS object. |
b |
A vector of y values. |
to.list |
If true, return list. |
... |
Other arguments, for the roots.chs.eval function. |
This function is a wrapper for roots.chs.eval.
(It calls roots.chs.eval with modified cy values).
It computes x values, where the spline's y value is equal to the values in b.
If to.list is false (the default), and length (b) is one:
It returns a single numeric vector.
Otherwise:
It returns a list of numeric vectors, one for each value in b.
Please refer to the help page for chs for background information and references.
chs, roots.chs
1 2 3 4 5 6 7 8 9 10 | #control points
cx <- 1:4
cy <- c (-4, -1, 1, 4)
#cubic Hermite spline
#(with function object, and default slopes)
f <- chs (cx, cy)
#solve for x, given y=2
solve (f, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.