Why do I get different answer between circular shifting and modulation for FFT?

I was trying to get a 64 point DFT of a sequence that does not start from the origin: ( x[-2], x[-1], x[0], x[1], x[2], x[3], x[4], x[5]), x[n] all equal to 5 for n= -2 to 5. and I tried to do it in two ways: first is do the circular shift and then use fft lke:
xcircst = horzcat( horzcat( [5 5 5 5 5 5], zeros( 1, 56)),[5 5]);
XK = fft (xcircst);
But it end up with a different answer from :
k = (0 :1: 63);
modulate = exp(-j*2*pi*k*2/64);
X = fft([5 5 5 5 5 5 5 5]) .*modulate;
Can some one tell me the reason why this happened? I through the circular shift would lead to the same result as modulation in frequency domain after DFT, but the results seems to disagree with that.

3 件のコメント

Jiayu He
Jiayu He 2017 年 2 月 1 日
there is a typo at the last line, it should be .*modulat
Jiayu He
Jiayu He 2017 年 2 月 1 日
X is the sequence after modulation, XK is the sequence after circular shift
Adam
Adam 2017 年 2 月 1 日
You can edit your original post using the pencil icon in its top right. Also please use {} Code to format code - it makes it more readable.

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

回答 (1 件)

Honglei Chen
Honglei Chen 2017 年 2 月 1 日
You are shifting the signal by 62 samples, not 2 samples, so you should define your modulate as
modulate = exp(-j*2*pi*k*62/64);
HTH

質問済み:

2017 年 2 月 1 日

コメント済み:

2017 年 2 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by