MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   频谱为何不对 (https://www.labfans.com/bbs/showthread.php?t=969)

feng319 2007-12-14 10:00

频谱为何不对
 
实现sa函数的fft并绘频谱
m函数如下
function f=k(disp1,disp2)
x=-10:0.001:10;[EMAIL="[email protected]"][email protected][/EMAIL](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

回复: 频谱为何不对
 
太难了!!!!!!!!!!!


所有时间均为北京时间。现在的时间是 11:27

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.