📄 psd_autocorrelation.m
字号:
function [ap_corr, en_corr] = psd_autocorrelation(xn, p);
%[ap_corr, en_corr] = psd_autocorrelation(xn, p) use the atuocorrelation
%method to estimate the psd of signal xn with a p phase AR model
%ap_corr is the AR coiefficients
%en_corr is the deviation estimated
rxx=correstimate(xn,xn); %caculate the autocorrelation fo signal xn
%caculate the autocorrelation matrix Rxx;
Rxx=zeros(p);
Rxd=zeros(p,1);
for i=1:p
for j=1:p
Rxx(i,j)=rxx(abs(i-j)+1);
end
Rxd(i)=rxx(i+1);
end
% caculate the AR coeffcients ap1...app
%Wn = linspace(0,pi,1024);
ap_corr = -(inv(Rxx))*Rxd;
en_corr = rxx(1)+Rxd'*ap_corr;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -