View source: R/interpolators.R
| cardinal_quintic_b_spline | R Documentation |
Constructs a cardinal quintic B-spline interpolator given control points.
cardinal_quintic_b_spline(
y,
t0,
h,
left_endpoint_derivatives = NULL,
right_endpoint_derivatives = NULL
)
y |
Numeric vector of data points to interpolate. |
t0 |
Numeric scalar representing the starting point of the data. |
h |
Numeric scalar representing the spacing between data points. |
left_endpoint_derivatives |
Optional two-element numeric vector for the derivative at the left endpoint. |
right_endpoint_derivatives |
Optional two-element numeric vector for the derivative at the right endpoint. |
An object of class cardinal_quintic_b_spline with methods:
interpolate(xi): Evaluate the interpolator at point xi.
prime(xi): Evaluate the derivative of the interpolator at point xi.
double_prime(xi): Evaluate the second derivative of the interpolator at point xi.
y <- seq(0, 1, length.out = 20)
t0 <- 0
h <- 1
interpolator <- cardinal_quintic_b_spline(y, t0, h)
xi <- 0.5
interpolator$interpolate(xi)
interpolator$prime(xi)
interpolator$double_prime(xi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.