60_direct_chs_evaluation: Direct CHS Evaluation

Description Usage Arguments Details References See Also Examples

Description

Functions for evaluating cubic Hermite splines, and their derivatives and indefinite integrals, directly.

Usage

1
2
3
4
5
6
7
8
chs.eval (cx, cy, cb, x, ...,
    outside = c (NA, NA) )

chs.derivative.eval (cx, cy, cb, x, ...,
    outside = c (NA, NA) )

chs.integral.eval (cx, cy, cb, x, ...,
    outside = c (NA, NA), constant=0)

Arguments

cx

Vector of unique ascending control point x values.
(Preferably, equally-spaced).

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.

...

.

Details

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.

References

Please refer to the help page for chs for background information and references.

See Also

chs

Examples

 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)

kubik documentation built on April 15, 2021, 9:09 a.m.