登录论坛

查看完整版本 : 频谱为何不对


feng319
2007-12-14, 10:00
实现sa函数的fft并绘频谱
m函数如下
function f=k(disp1,disp2)
x=-10:0.001:10;[email protected](fengjiang3)
y1=sinc(x);
y2=fft(y1);
subplot(121);disp1=plot(x,y1);
subplot(122);disp2=plot(x,y2);
end

elunxu
2007-12-24, 09:05
看看fft函数的帮助,里面有个例子,许多书上都引用的。

junejie
2008-03-16, 12:37
这是因为你对FFT输出结果不理解导致的
FFT输出结果为:0频,正频,负频
你可以先进行FFTSHIFT

radarvincent
2008-05-06, 00:12
楼上正解

fft得到的是0~fs的图像,所谓的“正确的”图像只要经过fftshift就可以:-fs/2~fs/2。fs为采样频率

Jeminy
2008-05-06, 15:56
因为求出的值是I/Q两路的.
而且由于坐标设置不大好,求出的值细节表现太不明显。

这样能不能满足你的要求?
x=-10:0.001:10;y1=sinc(x);
y2=abs(fft(y1));
x1= -10:0.001:-9.75
subplot(121);disp1=plot(x,y1);
subplot(122);disp2=plot(x1,y2(1:251));

喔...好老的帖

tsar5477
2008-10-30, 18:13
:smile:

guofeng0108
2008-10-31, 09:29
太难了!!!!!!!!!!!