cubicspline: Natural cubic spline interpolation

Description Usage Arguments Details Value See Also Examples

Description

Finds a piecewise linear function that interpolates the data points

Usage

1

Arguments

x

a vector of x values

y

a vector of y values

Details

cubicspline finds a piecewise cubic spline function that interpolates the data points. For each x-y ordered pair. The function will return a list of four vectors representing the coefficients.

Value

a list of coefficient vectors

See Also

Other algebra: bilinear, division, fibonacci, horner, isPrime, linterp, nthroot, polyinterp, pwiselinterp, quadratic

Other interp: bezier, bilinear, linterp, nn, polyinterp, pwiselinterp

Examples

1
2
3
4
5
6
7
x <- c(1, 2, 3)
y <- c(2, 3, 5)
f <- cubicspline(x, y)

x <- c(-1, 1, 0, -2)
y <- c(-2, 2, -1, -1)
f <- cubicspline(x, y)


Search within the cmna package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.