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=3998)

sfang9902 2008-07-25 16:04

[求助]请指教下面程序哪里不对
 
设信号为:x(t)=sin(2π20t),在信号中加入方差为0.1的白噪声序列,取采样频率fs=200Hz,采样点数N=200,用Burg算法分析信号。(应该出现谱分裂现象,可是我弄的程序不出现,调了很多次,也没出来,请各信号处理高手指点,小女子将万分感激)
我编的程序如下:
clear all
fs=200;
nfft=200;
order=20;
t=0:1/fs:1;
f1=20;

x=sin(2*pi*f1*t)+sqrt(0.1)*randn(size(t));
[p,f]=pburg(x,order,nfft,fs);
p1=10*log10(p);

plot(f,p1)
grid on;
xlabel('Frequency(Hz)');
ylabel('相对功率谱密度(dB/Hz)');
title('Burg PSD Estimate');

joeyoung83 2008-08-24 10:27

回复: [求助]请指教下面程序哪里不对
 
期待答案:redface: :redface:

pslpsl 2008-08-24 23:09

回复: [求助]请指教下面程序哪里不对
 
[code]
clear all
fs=200;
nfft=200;
order=20;
t=0:1/fs:1;
f1=20;
x=sin(2*pi*f1*t)+sqrt(0.1)*randn(size(t));
order=floor(length(x)/5);
[p,f]=pburg(x,order,nfft,fs);
pmax=max(p);
p=p/pmax;
p1=10*log10(p);
plot(f,p1)
grid on;
xlabel('Frequency(Hz)');
ylabel('相对功率谱密度(dB/Hz)');
title('Burg PSD Estimate');
ymin_psd=min(p1)-1;
ymax_psd=max(p1)+1;
axis([0 fs/2 ymin_psd ymax_psd]);

[/code]

sfang9902 2008-08-26 21:14

回复: [求助]请指教下面程序哪里不对
 
order=floor(length(x)/5);

ymin_psd=min(p1)-1;
ymax_psd=max(p1)+1;

什么意思?为什么这样做呢?

可是还是出不来谱线分裂的现象啊?麻烦您有时间再看看,谢谢


所有时间均为北京时间。现在的时间是 04:57

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