Rank: 2441 based on 45 downloads (last 30 days) and 1 file submitted
photo

Kan Wu

E-mail
Company/University
Nanyang Tech. U. Singapore

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Kan
Updated   File Tags Downloads
(last 30 days)
Comments Rating
02 Oct 2009 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu signal processing, fast fourier transfor... 45 7
  • 4.2
4.2 | 5 ratings
Comments and Ratings by Kan View all
Updated File Comments Rating
03 Jan 2014 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu

Hi Yuji,

ifftshift is to correct the bug in fftshift when dealing with the sequence with odd length (that is the number of elements in the sequence is odd). So it is safe to always use: fftshift(fft(ifftshift(sig))) or fftshift(ifft(ifftshift(spectrum))).

16 May 2010 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu

To Mehta, yes you r right. ifftshift is used for sequence with odd length. Thank you for the correction!

01 Mar 2010 errorbarxy Errorbarxy allows the user to plot both horizontal and vertical errorbars. Author: James Rooney

There is a small bug. When I display legend, the original curve and errorbar are two different items. In Matlab errorbar() function, they are one curve. Hope you can modify it

28 Feb 2010 errorbarxy Customizable error bar plot in X and Y direction Author: Jean-Yves Tinevez

very good

28 Feb 2010 errorbarxy Errorbarxy allows the user to plot both horizontal and vertical errorbars. Author: James Rooney

very good

Comments and Ratings on Kan's Files View all
Updated File Comment by Comments Rating
16 Jun 2014 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu Qi, Junqiu

03 Jan 2014 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu Wu, Kan

Hi Yuji,

ifftshift is to correct the bug in fftshift when dealing with the sequence with odd length (that is the number of elements in the sequence is odd). So it is safe to always use: fftshift(fft(ifftshift(sig))) or fftshift(ifft(ifftshift(spectrum))).

13 May 2013 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu Zhang, Yuji

hi Kan,Shalin,

Thanks for the code and the discussion - nice and helpful.

A book I'm reading says it should be
fftshift(fft(fftshift(sig)))
and
ifftshift(ifft(ifftshift(spectrum)))

I'm confused. Could you explain where to use ifftshift when N=odd?

Thank you!
(The book is "Numerical Simulation of Optical Wave Propagation with examples in Matlab")

23 May 2010 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu lanqing, zhang

thanl you very much !

18 May 2010 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu Mehta, Shalin

You're welcome. ifftshift is the same as fftshift for even length sequence, but different for odd length. So if one uses fftshift(fft(ifftshift(...))) things work well. By the way, scaling by dt and df to correct for scaling introduced by FFT algorithm is neat trick.

Contact us