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.
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.
Value
bspline.basisReturns 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.basisReturns a matrix with length(x) rows and nbasis columns.
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(-1,2,by=0.01)
y <- periodic.bspline.basis(x,nbasis=5)
matplot(x,y)