View source: R/interpolators.R
| makima | R Documentation |
Constructs a Modified Akima interpolator given the vectors of abscissas, ordinates, and derivatives.
makima(x, y, left_endpoint_derivative = NULL, right_endpoint_derivative = NULL)
x |
Numeric vector of abscissas (x-coordinates). |
y |
Numeric vector of ordinates (y-coordinates). |
left_endpoint_derivative |
Optional numeric value of the derivative at the left endpoint. |
right_endpoint_derivative |
Optional numeric value of the derivative at the right endpoint. |
An object of class makima with methods:
interpolate(xi): Evaluate the interpolator at point xi.
prime(xi): Evaluate the derivative of the interpolator at point xi.
push_back(x, y): Add a new control point
x <- c(0, 1, 2, 3)
y <- c(0, 1, 0, 1)
interpolator <- makima(x, y)
xi <- 0.5
interpolator$interpolate(xi)
interpolator$prime(xi)
interpolator$push_back(4, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.