ifftshift: Inverse FFT shift of a 2d matrix.

Description Usage Arguments Details Value Examples

View source: R/HelpFunctions.R

Description

ifftshift is an R equivalent to the Matlab function ifftshift applied on matrices. For more information about ifftshift see the Matlab documentation.

Usage

1
ifftshift(inputMatrix, dimension = -1)

Arguments

inputMatrix

Matrix to be swapped.

dimension

Which swap should be performed?

  • 1: swap halves along the rows.

  • 2: swap halves along the columns.

  • -1: swap first quadrant with third and second quadrant with fourth.

Details

ifftshift is the inverse function to fftshift. For more information see the details of fftshift

Value

Swapped matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

mrbsizeR documentation built on April 1, 2020, 5:08 p.m.