armodcov.m

来自「Introduction to Statistical and Adaptive」· M 代码 · 共 28 行

M
28
字号
function [ahat,VarP] = armodcov(x,P)

% Modofied covariance method to compute AR(P) model coefficients

% [ahat,e,Ep_fb] = armodcov(x,P)

%  Inputs:

%          x : data vector; P : Model order

% Outputs:

%          ahat : coefficient estimates

%             e : error vector

%          VarP : Error variance (forward_backword)

%

%-----------------------------------------------------------

% 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.
%-----------------------------------------------------------



Rbar = lsmatrix(x,P+1);

if isreal(Rbar)

   Rfb = Rbar + flipud(fliplr(Rbar));

else

   Rfb = Rbar + flipud(fliplr(conj(Rbar)));

end



[ahat,VarP] = olsigest(Rfb,1);

⌨️ 快捷键说明

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