Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tensorProduct

Tensor product for univariate functions on one-dimensional domains


Description

This function calculates tensor product functions for up to three objects of class funData defined on one-dimensional domains.

Usage

tensorProduct(...)

Arguments

...

Two or three objects of class funData, that must be defined on a one-dimensional domain, each.

Value

An object of class as funData that corresponds to the tensor product of the input functions.

Warning

The function is only implemented for up to three functions on one-dimensional domains.

See Also

Examples

### Tensor product of two functional data objects
x <- seq(0, 2*pi, 0.1)
f1 <- funData(x, outer(seq(0.75, 1.25, 0.1), sin(x)))
y <- seq(-pi, pi, 0.1)
f2 <- funData(y, outer(seq(0.25, 0.75, 0.1), sin(y)))

plot(f1, main = "f1")
plot(f2, main = "f2")

tP <- tensorProduct(f1, f2)
dimSupp(tP)
plot(tP, obs = 1)

### Tensor product of three functional data objects
z <- seq(-1, 1, 0.05)
f3 <- funData(z, outer(seq(0.75, 1.25, 0.1), z^2))

plot(f1, main = "f1")
plot(f2, main = "f2")
plot(f3, main = "f3")

tP2 <- tensorProduct(f1, f2, f3)
dimSupp(tP2)

funData

An S4 Class for Functional Data

v1.3-5
GPL-2
Authors
Clara Happ-Kurz [aut, cre]
Initial release
2020-04-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.