Why should I use 2 fftshift?

Hello if I have signal x (in time domain).
I saw that sometimes people do fftshift(fft(ffshift(x))). Now, I understand the usage of fftshift to move the DC to the center. But what's the reasoning behind using fftshift twice?
Seems to me that fftshift(fft(x)), should be enough.
Am I missing something here?
Thanks

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 7 月 31 日

0 投票

You can test it yourself to see if the two are equal.
The magnitudes of the two are equal, but the real and imaginary components are different.

1 件のコメント

moose
moose 2015 年 8 月 1 日
thank you.
yes, I saw that the subtraction gives me zero.
so, what's the difference? or, what's the more right way to do it?
I can understand my way fftshift(fft(x)). you're shifting the resulting fft signal.
But, what does it mean, fftshift(fft(fftshift(x)))? it seems that you're first doing the shift on x which is in time domain???

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2015 年 7 月 31 日

コメント済み:

2015 年 8 月 1 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by