Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2008-04-16
年龄: 41
帖子: 3
声望力: 0 ![]() |
![]()
我现在做的是用直接法估计信号的功率谱密度:
程序如下: fs=1000; %generate the sequence with the AWGN noise n=0:1/fs:1; xn=cos(2*pi*40*n)+3*cos(2*pi*100*n)+randn(size(n)); %computing the DFT of the sequence nfft=2048; XK=fft(xn,nfft); %computing the PSD Pxx=abs(XK).^2/length(n); %generate the figure index=0:round(nfft/2-1); k=index*fs/nfft; k1=index/nfft; plot_pxx=10*log10(Pxx(index+1)); plot(k1,plot_pxx) ylabel('power spectrum density ') xlabel('sequence fs=1000') 问题是: 1:当fs取不同的值的时候,功率谱密度的差距很大,原因??????? 2:k=index*fs/nfft这个语句我知道每次都要用的,但是是什么意思呢??? |
![]() |
![]() |
主题工具 | |
显示模式 | |
|
|
![]() |
||||
主题 | 主题作者 | 版面 | 回复 | 最后发表 |
!!急求!!用Java调用matlab的函数 | xqwang001 | MATLAB论坛 | 2 | 2009-11-22 00:18 |
非线性最小二乘拟合 | esther0401 | MATLAB论坛 | 2 | 2008-06-01 13:38 |
[讨论]记录留存在你心目中的漫画片 | dnping | 学术科研 | 7 | 2008-05-31 19:13 |
【求助】notebook | zhy3942611 | MATLAB论坛 | 0 | 2007-07-09 11:34 |