Skip to content

fft2

2D Fast Fourier Transform.

Y = fft2(X)
Y = fft2(X, m, n)

Returns the 2D DFT of X. With m and n, pads/truncates each dimension first. Useful for image-processing — spectra, convolution via the convolution theorem, frequency-domain filtering.

Y = fft2(magic(8))
% magnitude spectrum of an 8×8 image
  • fft — 1D Fast Fourier Transform.
  • fftn — N-dimensional Fast Fourier Transform.