powered by
Constructs a cardinal cubic Hermite interpolator given the vectors of abscissas, ordinates, and derivatives.
cardinal_cubic_hermite(y, dydx, x0, dx)
An object of class cardinal_cubic_hermite with methods:
cardinal_cubic_hermite
interpolate(xi): Evaluate the interpolator at point xi.
interpolate(xi)
xi
prime(xi): Evaluate the derivative of the interpolator at point xi.
prime(xi)
domain(): Get the domain of the interpolator.
domain()
Numeric vector of ordinates (y-coordinates).
Numeric vector of derivatives (slopes) at each point.
Numeric value of the first abscissa (x-coordinate).
Numeric value of the spacing between abscissas.
y <- c(0, 1, 0) dydx <- c(1, 0, -1) interpolator <- cardinal_cubic_hermite(y, dydx, 0, 1) xi <- 0.5 interpolator$interpolate(xi) interpolator$prime(xi) interpolator$domain()
Run the code above in your browser using DataLab