Rearranges a zero-frequency-shifted Fourier transform back to the original.
ifftshift(x, MARGIN = 2)
input data, specified as a vector or matrix.
dimension to operate along, 1 = row, 2 = columns (default).
Specifying MARGIN = c(1, 2)
centers along both rows and columns.
Ignored when x
is a vector.
back-transformed vector or matrix.
Undo the action of the fftshift function. For even length x
,
fftshift
is its own inverse, but not for odd length input.
# NOT RUN {
Xeven <- 1:6
res <- fftshift(fftshift(Xeven))
Xodd <- 1:7
res <- fftshift(fftshift(Xodd))
res <- ifftshift(fftshift(Xodd))
# }
Run the code above in your browser using DataLab