?? 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 + -