Description Usage Arguments Details References See Also Examples
Functions for evaluating cubic Hermite splines, and their derivatives and indefinite integrals, directly.
1 2 3 4 5 6 7 8 |
cx |
Vector of unique ascending control point x values. |
cy |
Vector of control point y values. |
cb |
Vector of control slopes. |
x |
Vector of x values, where the spline is evaluated at. |
outside |
A vector of length two, giving the value of the spline outside the control points. |
constant |
Constant term. |
... |
. |
Refer to the help page for chs, for more information.
(The functions described in that help page are similar to these functions).
These functions (with a .eval suffix) evaluate cubic Hermite splines, and their derivatives and indefinite integrals, without using function objects, and with minimal error checking.
Alternatively, you can use function objects, which are likely to be more convenient, in most cases.
chs.eval
Evaluate cubic Hermite splines.
chs.derivative.eval
Evaluate (exact) derivatives of cubic Hermite splines.
chs.integral.eval
Evaluate indefinite integrals of cubic Hermite splines.
Please refer to the help page for chs for background information and references.
chs
1 2 3 4 5 6 7 8 9 10 | #control points
cx <- 1:4
cy <- c (-4, -1, 1, 4)
#control slopes
cb <- chs.slopes (cx, cy)
#evaluate
#(without function object)
chs.eval (cx, cy, cb, 3.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.