arwin.m

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

M
32
字号
function [a,V,FPE]=arwin(x,p)
% All-Pole (AR) modeling using Full-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/4/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=autofft(x,p+1);
R=toeplitz(r(1:p));
d=r(2:p+1);

c=-R\d;
a=[1 c']';

e=conv(a,x);

V=(e'*e)/(Lx);
FPE=V*(1+p/Lx)/(1-p/Lx);

%V1=r'*a % Equivalent way to compute V

⌨️ 快捷键说明

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