📄 arxinhao.m
字号:
clear
clf'
clc
N=128;
%产生x1信号即AR信号
noise=rands(1,N);
xn=zeros(1,N);
xn(1)=0.1;xn(2)=0.2;
thita=pi/4;
a1=0.98%*exp(j*thita);
a2=1%*exp(-j*thita);
for n=3:N
xn(n)=noise(n)-a1*xn(n-1)-a2*xn(n-2)
end
subplot(211);
plot(xn);
title('xn(n)=noise(n)-a1*xn(n-1)-a2*xn(n-2)');
p=floor(length(xn)/3)+1;
nfft=1024;
[xpsd,f]=pburg(xn,p,nfft,1000);
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)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -