📄 arwin.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -