📄 arls.m
字号:
function [a,e,V,FPE]=arls(x,p)
% function [a,e,V,FPE]=arls(x,p)
% All-Pole (AR) modeling using No-Windowing
% Linear least-squares
% Model parameters [1 a1...ap V]
% V=input signal variance.
% FPE=Akaike's final prediction error criterion
%
% Programmed by: Dimitris Manolakis, 10/1/93
%
%-----------------------------------------------------------
% Copyright 2000, by Dimitris G. Manolakis, Vinay K. Ingle,
% and Stephen M. Kogon. For use with the book
% "Statistical and Adaptive Signal Processing"
% McGraw-Hill Higher Education.
%-----------------------------------------------------------
Lx=length(x);
R=zeros(p,p);
d=zeros(p,1);
for n=p+1:Lx
z=[-x(n-p:n-1)']';
R=R+z*z';
d=d+x(n)*z;
end
c=R\d;
a=[1 flipud(c(1:p))']';
e=filter(a,1,x);
for n=1:p e(n)=0; end;
V=(e'*e)/(Lx-p);
FPE=V*(1+p/Lx)/(1-p/Lx);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -