bsp {bspline}R Documentation

Calculate B-spline values from their coefficients qw and knots xk

Description

Calculate B-spline values from their coefficients qw and knots xk

Usage

bsp(x, xk, qw, n = 3L)

Arguments

x

Numeric vector, abscissa points at which B-splines should be calculated. They are supposed to be non decreasing.

xk

Numeric vector, knots of the B-splines. They are supposed to be non decreasing.

qw

Numeric vector or matrix, coefficients of B-splines. NROW(qw) must be equal to length(xk)-n-1 where n is the next parameter

n

Integer scalar, polynomial order of B-splines, by default cubic splines are calculated.

Details

This function does nothing else than calculate a dot-product between a B-spline basis matrix calculated by bsc() and coefficients qw. If qw is a matrix, each column corresponds to a separate set of coefficients. For x values falling outside of xk range, the B-splines values are set to 0. To get a function calculating spline values at arbitrary points from xk and qw, cf. par2bsp().

Value

Numeric matrix (column number depends on qw dimensions), B-spline values on x.

See Also

bsc, par2bsp


[Package bspline version 2.2 Index]