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: data2fd evalfd

Quantlet: inprod
Description: computes the inner products of fd or fdbasis objects.

Usage: inprodmat=inprod(fdo1,fdo2{,Lfd1{,Lfd2{,JMAX{,EPS}}}})
Input:
fdo1 list, first fd or fdbasis object (see createfdbasis.xpl)
fdo2 list, second fd or fdbasis object (see createfdbasis.xpl)
Lfd1 list, optional, first evaluation object (see createldo.xpl). A scalar or a (r x 1) vector of integers which indicates the order of derivatives to obtain. In the case of an LDO with constant coefficients, Lfd1 must be a (r x 2) matrix, where the first column contains the coefficients, the second one the orders of derivatives. When to apply an LDO with variable coefficients Lfd1 must be an LDO object. The default value is Lfd1 = 2.
Lfd2 list, optional, second evaluation objec. See Lfd1. The default value is Lfd2 = 2.
JMAX scalar, optional, maximum number of iterations. The default value is JMAX = 15.
EPS scalar, optional, fractional accuracy desired, as determined by the extrapolation error estimate. The default value is 1e-4.
Output:
inprodmat (nbasis1 x nbasis2 x r) array, inner products for each possible pair of functions. The third dimension only appears when Lfd1 = Lfd2 are (r x 1) vectors. Otherwise the third dimension is one.

Note:

Example:
library("fda")
bspl = createfdbasis("bspline", #(0, 10), 7, #(0, 2, 3, 6, 10))
inprod(bspl, bspl, 2, 3)

Result:
Contents of inprodmat

[1,]  -1.1239   2.3727  -1.4986  0.24976        0        0        0
[2,]   1.4113  -3.2358   2.3626 -0.61016  0.072132        0        0
[3,] -0.05636  0.40751 -0.64581  0.41078 -0.13065  0.014533        0
[4,] -0.23097  0.52769 -0.34434  0.0074132  0.077457 -0.057567  0.020328
[5,]        0 -0.072132   0.1412 -0.095416  0.026233  0.0034838 -0.0033727
[6,]        0        0 -0.015045  0.057716 -0.12842  0.17303 -0.087285
[7,]        0        0        0 -0.020094  0.083247 -0.13348  0.070329



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