⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pu.m

📁 主要是BURG法对声信号进行谱估计的程序。 还有利用BURG法求AR模型系数
💻 M
字号:
clear
Fs=500;
n=0:1/Fs:0.4;
w1=200*pi;A1=5;
w2=400*pi;A2=12;
xn=A1*(cos(w1*n)+j*sin(w1*n))+A2*(j*sin(w2*n)+cos(w2*n))+randn(size(n));%xn=A1*exp(jw1n)+A2*exp(jw2n);
subplot(211);
plot(n,xn);
xlabel('n');
ylabel('xn');
title('xn=A1*exp(jw1n)+A2*exp(jw2n)+e(n)');
ymax_xn=max(xn)+0.2;
ymin_xn=min(xn)-0.2;
axis([0 0.3 ymin_xn ymax_xn]);
p=floor(length(xn)/3)+1;
nfft=1024;
[xpsd,f]=pburg(xn,p,nfft,Fs,'half');
pmax=max(xpsd);
xpsd=xpsd/pmax;
xpsd=10*log10(xpsd+0.000001);
subplot(212);
plot(f,xpsd);
title('Power Spectral estimate with burg');
ylabel('Power Spectral estimate(dB)');
xlabel('w(Hz)');
grid on;
ymin=min(xpsd)-2;
ymax=max(xpsd)+2;
axis([0 Fs/2 ymin ymax]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -