Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: fftshift
Replies: 4   Last Post: Jan 5, 2013 12:08 AM

 Messages: [ Previous | Next ]
 Greg Heath Posts: 6,387 Registered: 12/7/04
Re: fftshift
Posted: Dec 27, 2012 7:09 PM

"maryam" wrote in message <kbie5v\$29n\$1@newscl01ah.mathworks.com>...
> I would like to know when a vector is transformed to Fourier domain using fftshift(fft(fftshift(s))),
> S=[t1 t2 t3 t4 ?. tn] & sampling frequency=Fr
> result vector fftshift(fft(fftshift(s))) is equal to [0 ?.. Fr] & sampling=Fr/n or [-Fr/2 ?.. Fr/2]?

If time is bipolar and xb is defined over

tb = dt*[ -(N-1)/2 : (N-1)/2 ] for N odd
tb = dt*[ -N/2 : N/2-1 ] for N even

then

x = ifftshift(xb);

is defined over unipolar time

t = dt*[ 0 : N-1];

Furthermore,

X = fft(x);

is defined over unipolar frequency

f = df * [ 0 : N-1 ]:

and

Xb = fftshift(X);

is defined over bipolar frequency

fb = df*[ -(N-1)/2 : (N-1)/2 ]; for N odd
fb = df*[ -N/2 : N/2-1 ]; for N even

When N is even, fftshift and ifftshift are equal. In general, however, they are inverses.
Therefore, in general,

Xb = fftshift(fft(ifftshift(xb));

and

xb = fftshift(ifft(ifftshift(Xb)));

Alternate forms of the time and frequency intervals can be obtained by using the
the following dual relationships of time period T and sampling frequency Fs:

Fs = 1/dt, T = 1/df

dt = T/N, df = Fs/N

t = 0: dt : T - dt;

f = 0: df : Fs - df

I will let you obtain the corresponding forms for tb and fb;

Hope this helps.

Greg

Date Subject Author
12/27/12 maryam
12/27/12 ImageAnalyst
12/27/12 Greg Heath
12/28/12 maryam
1/5/13 Greg Heath