powered by
Constructs a cardinal quadratic B-spline interpolator given control points.
cardinal_quadratic_b_spline( y, t0, h, left_endpoint_derivative = NULL, right_endpoint_derivative = NULL )
An object of class cardinal_quadratic_b_spline with methods:
cardinal_quadratic_b_spline
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 to interpolate.
Numeric scalar representing the starting point of the data.
Numeric scalar representing the spacing between data points.
Optional numeric scalar for the derivative at the left endpoint.
Optional numeric scalar for the derivative at the right endpoint.
y <- c(0, 1, 0, 1) t0 <- 0 h <- 1 interpolator <- cardinal_quadratic_b_spline(y, t0, h) xi <- 0.5 interpolator$interpolate(xi) interpolator$prime(xi)
Run the code above in your browser using DataLab