B-splines {pomp} | R Documentation |
B-spline bases
Description
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.
Usage
bspline.basis(x, degree = 3, knots)
periodic.bspline.basis(x, nbasis, degree = 3, period = 1)
Arguments
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. |
Value
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.
|
Author(s)
Aaron A. King (kingaa at umich dot edu)
Examples
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)
[Package
pomp version 0.22-6
Index]