Fourier Basis Functions
Evaluates the Fourier basis functions on a d-dimensional box with d-dimensional frequencies k_i at the d-dimensional coordinates x_j.
fourierbasis(x, k, win = boxx(rep(list(0:1), ncol(k)))) fourierbasisraw(x, k, boxlengths)
x |
Coordinates.
A |
k |
Frequencies.
A |
win |
window (of class |
boxlengths |
numeric giving the side lengths of the box domain of the Fourier functions. |
The result is an m by n matrix where the (i,j)'th entry is the d-dimensional Fourier basis function with frequency k_i evaluated at the point x_j, i.e.,
1/sqrt(|W|) * exp(2*pi*i*(k_{i,1}*x_{j,1}/L_1 + ... + k_{i,d}*x_{j,d}/L_d))
where L_l, l=1,...,d are the box side lengths
and |W| is the volume of the
domain (window/box). Note that the algorithm does not check whether
the coordinates given in x
are contained in the given box.
Actually the box is only used to determine the side lengths and volume of the
domain for normalization.
The stripped down faster version fourierbasisraw
doesn't do checking or
conversion of arguments and requires x
and k
to be matrices.
An m
by n
matrix of complex values.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
Rolf Turner r.turner@auckland.ac.nz
and Ege Rubak rubak@math.aau.dk
## 27 rows of three dimensional Fourier frequencies: k <- expand.grid(-1:1,-1:1, -1:1) ## Two random points in the three dimensional unit box: x <- rbind(runif(3),runif(3)) ## 27 by 2 resulting matrix: v <- fourierbasis(x, k) head(v)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.