powered by
Constructs a barycentric rational interpolator given data points.
barycentric_rational(x, y, order = 3)
An object of class barycentric_rational_interpolator with methods:
barycentric_rational_interpolator
interpolate(xi): Evaluate the interpolator at point xi.
interpolate(xi)
xi
prime(xi): Evaluate the derivative of the interpolator at point xi.
prime(xi)
Numeric vector of data points (abscissas).
Numeric vector of data values (ordinates).
Integer representing the approximation order of the interpolator, defaults to 3.
x <- c(0, 1, 2, 3) y <- c(1, 2, 0, 2) order <- 3 interpolator <- barycentric_rational(x, y, order) xi <- 1.5 interpolator$interpolate(xi) interpolator$prime(xi)
Run the code above in your browser using DataLab