Scilab Function

fftshift - rearranges the fft output, moving the zero frequency to the center of the spectrum

Calling Sequence

y=fftshift(x [,job])

Parameters

Description

if x results of an fft computation y= fftshift(x) or y= fftshift(x,"all") moves the zero frequency component to the center of the spectrum, which is sometimes a more convenient form.

If x is a vector of size n, y is the vector x([n/2+1:n,1:n/2])

If x is an m by n matrix y is the matrix x([m/2+1:n,1:m/2],[n/2+1:n,1:n/2]).

  [x11 x12]                  [x22 x21]
x=[       ]        gives   y=[       ]
  [x21 x22]       [x12 x11]
   

y= fftshift(x,n) make the swap only along the nth dimension

Examples

See Also