5.1 Discrete Fourier Transform

dft(X)

Replaces the columns of a dense complex matrix with their discrete Fourier transforms: if X has n rows,

        n∑-1      √--
X [k,:] :=    e-2πjk -1∕nX[j,:],   k = 0,...,n - 1.
        j=0

idft(X)

Replaces the columns of a dense complex matrix with their inverse discrete Fourier transforms: if X has n rows,

           n∑-1    √--
X [k,:] := 1   e2πjk -1∕nX [j,:],    k = 0,...,n - 1.
         n j=0

The module also includes a discrete N-dimensional Fourier transform. The input matrix is interpreted as an N-dimensional matrix stored in column-major order. The discrete N-dimensional Fourier transform computes the corresponding one-dimensional transform along each dimension. For example, the two-dimensional transform applies a one-dimensional transform to all the columns of the matrix, followed by a one-dimensional transform to all the rows of the matrix.

dftn(X[, dims=X.size])

Replaces a dense complex matrix with its N-dimensional discrete Fourier transform. The dimensions of the N-dimensional matrix are given by the N-tuple dim. The two-dimensional transform is computed as dftn(X, X.size).

idftn(X[, dims=X.size])

Replaces a dense complex N-dimensional matrix with its inverse N-dimensional discrete Fourier transform. The dimensions of the matrix are given by the tuple dim. The two-dimensional inverse transform is computed as idftn(X, X.size).