【发布时间】:2015-07-28 16:02:21
【问题描述】:
这就是我写代码的方式
fc = 10;
td = 5000;
fs = 3*fc;
ts = 1/fs;
t = 0:ts:1-ts;
a = cos(2*pi*fc*t);
figure, plot(a);
Y = fftshift(fft(a));
nfft = length(Y);
p = 0:fs/nfft:1-fs/nfft;
p1 = Y.*exp(-1i*2*pi*p*td);
p2 = ifft(ifftshift(p1));
figure, plot(abs(p2));
这是我达到的结果。但是有相移的信号和没有相移的信号是一样的。
【问题讨论】:
-
不要混合两种解决方案,请参阅我的编辑。
标签: matlab signal-processing fft