Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: fda
See also: Fourierevalgd polyevalgd

Quantlet: Bsplineevalgd
Description: calculates the basis matrix phi of k-th order B-splines for a given strictly non-decreasing knot sequence.

Usage: phi = Bsplineevalgd(tvec,norder{,xvec{,deriv{,boolextend}}})
Input:
tvec n x 1 vector, strictly non-decreasing knot sequence. The same knot sequence will be applied to all arguments xvec.
norder integer, indicates the B-spline order (e.g. for cubic B-splines norder = 4)
xvec p x q matrix, optional, arguments where the B-splines matrix should be evaluated at. The default value is tvec.
deriv r x 1 vector of integers (>= 0), optional, contains the orders of derivatives to compute. If deriv = 0 the actual B-spline bases will be calculated. The default value is deriv = 0.
boolextend scalar, optional, if boolextend = 1 tvec will be extended sufficiently to get multiple exterior knots. The default value is boolextend = 1.
Output:
phi (n x (n+norder-2) x r x q) array, values of all n+norder-2 B-spline basis functions of the knot sequence

Note:

Example:
library("fda")
tvec = #(0, 2, 3, 6, 10)
Bsplineevalgd(tvec, 4, tvec, #(0, 2))

Result:
Contents of phi

[,,1,1,1,1,1,1]

[1,]        1        0        0        0        0        0        0
[2,]        0  0.11111  0.66667  0.22222        0        0        0
[3,]        0        0    0.375  0.59375  0.03125        0        0
[4,]        0        0        0  0.28571  0.53061  0.18367        0
[5,]        0        0        0  2.5023e-47  3.3808e-31  1.3323e-15        1
[,,2,1,1,1,1,1]
[1,]      1.5     -2.5        1        0        0        0        0
[2,]        0  0.66667       -1  0.33333        0        0        0
[3,]        0        0     0.25  -0.4375   0.1875        0        0
[4,]        0        0        0  0.10714 -0.22959  0.12245        0
[5,]        0        0        0  4.7581e-17  0.21429 -0.58929    0.375



Author: J. Ulbricht 20040906 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006