fftshift2: Rearranges FFT output to put zero-distance in center of image

Description Usage Arguments Value References

View source: R/fftshift2.R

Description

Rearranges outputs from fft to move the zero-frequency component to the center of the matrix. This is useful to visualize a Fourier transform with the zero-frequency component in the center of the image.

Usage

1

Arguments

x

A matrix returned from fft()

Value

The transformed matrix

References

Adapted from GNU Octave's fftshift function (http://octave.sourceforge.net/octave/function/fftshift.html http://hg.savannah.gnu.org/hgweb/octave/file/914c0b103a3d/scripts/signal/fftshift.m#l76)

http://www.mathworks.com/help/matlab/ref/fftshift.html

http://stackoverflow.com/questions/5735720/effcient-way-to-do-fft-shift-in-matlab-without-using-fftshift-function

The waved package (http://cran.r-project.org/web/packages/waved/index.html) has a 1-dimensional fftshift function.


AdamWilsonLab/rasterAutocorr documentation built on March 19, 2020, 12:01 a.m.