View source: R/HelpFunctions.R
ifftshift | R Documentation |
ifftshift
is an R equivalent to the Matlab function ifftshift
applied on matrices. For more information about ifftshift
see
the Matlab documentation.
ifftshift(inputMatrix, dimension = -1)
inputMatrix |
Matrix to be swapped. |
dimension |
Which swap should be performed?
|
ifftshift
is the inverse function to fftshift
. For more
information see the details of fftshift
Swapped matrix.
set.seed(987)
sampleMat <- matrix(sample(1:10, size = 25, replace = TRUE), nrow = 5)
# Swap halves along the rows:
ifftshift(sampleMat, dimension = 1)
# Swap halves along the columns:
ifftshift(sampleMat, dimension = 2)
# Swap first quadrant with third and second quadrant with fourth:
ifftshift(sampleMat, dimension = -1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.