Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Greg Heath

Posts: 6,171
Registered: 12/7/04
Re: fftshift
Posted: Dec 27, 2012 7:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"maryam" wrote in message <kbie5v$29n$1@newscl01ah.mathworks.com>...
> Hi dear friends, thanks for your reading
> 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


x = ifftshift(xb);

is defined over unipolar time

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


X = fft(x);

is defined over unipolar frequency

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


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));


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.


Date Subject Author
Read fftshift
Read Re: fftshift
Read Re: fftshift
Greg Heath
Read Re: fftshift
Read Re: fftshift
Greg Heath

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.