Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Signal Processing > ifftshift

ifftshift

inverse of fftshift

Calling Sequence

y=ifftshift(x)

Arguments

x, y

real or complex vector or matrix.

Description

ifftshift(x) swaps the left and right halves of the vector x.

For matrices, ifftshift(x) swaps the first quadrant with the third and the second quadrant with the fourth.

If x is a multidimensional array, ifftshift(x) swaps "half-spaces" of x along each dimension.

Examples

Example #1:

// Make a signal
t = 0:0.1:1000;
x = 3*sin(t)+8*sin(3*t)+0.5*sin(5*t)+3*rand(t);
// Compute the fft
y = fft(x, -1);
// Invert the result
shift = fftshift(y);
// Invert the inverted result
invShift = ifftshift(shift);
// Check that we recreated the original result
and(y == invShift)

Example #2:

// Make a 2D image
t = 0:0.1:30;
x = 3*sin(t')*cos(2*t)+8*sin(3*t')*sin(5*t)+..
  0.5*sin(5*t')*sin(5*t)+3*rand(t')*rand(t);
// Compute the fft
y = fft(x,-1);

// Invert the result
shift = fftshift(y);
// Invert the inverted result
invShift = ifftshift(shift);
// Check that we recreated the original result
and(y == invShift)

See Also

  • fftshift — rearranges the fft output, moving the zero frequency to the center of the spectrum
  • fft — fast Fourier transform.
Report an issue
<< hilbert Signal Processing mrfit >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:46:50 CEST 2014