t <- seq(0, 1, length.out = 100)
X1 <- matrix(sin(2*pi*t), nrow = 1)
X2 <- matrix(cos(2*pi*t), nrow = 1)
fd1 <- fdata(X1, argvals = t)
fd2 <- fdata(X2, argvals = t)
# Inner product of sin and cos over [0,1] should be 0
inprod.fdata(fd1, fd2)
Run the code above in your browser using DataLab