B-splines {pomp} | R Documentation |
These functions generate B-spline basis functions as lookup tables.
bspline.basis
gives a set of basis functions.
periodic.bspline.basis
gives a basis of periodic spline functions.
bspline.basis(x, degree = 3, knots) periodic.bspline.basis(x, nbasis, degree = 3, period = 1)
x |
Vector at which the spline functions are to be evaluated. |
degree |
Degree of requested B-splines. |
knots |
Vector of positions of the knots. |
nbasis |
The number of basis functions to return. |
period |
The period of the requested periodic B-splines. |
For periodic.bspline.basis
, x
must be positive and not
greater than period
.
bspline.basis |
Returns a matrix with length(x) rows and
nbasis=length(knots)-degree-1 columns. Each column contains
the values one of the nbasis spline functions. |
periodic.bspline.basis |
Returns a matrix with length(x) rows and
nbasis columns. |
Aaron A. King (kingaa at umich dot edu)
x <- seq(-0.2,1.2,by=0.01) y <- bspline.basis(x,degree=7,seq(0,1,length=14)) matplot(x,y) x <- seq(0,1,by=0.01) y <- periodic.bspline.basis(x,nbasis=5) matplot(x,y)