fcov.m

来自「solution for the Statistical modelling f」· M 代码 · 共 69 行

M
69
字号
function [gamma,err] = fcov(x,p)%FCOV	Forward covariance algorithm.%----%USAGE	[gamma,err] = fcov(x,p) %%	An all-pole model of order p for the input sequence x is%	found using the forward covariance method.  The outputs%	are the reflection coefficients%		gamma = [g(1), g(2), ... , g(p)]%	corresponding to the all-pole model, and the model error%	which is returned in err.%%  see also COVM, MCOV and BURG%%---------------------------------------------------------------% copyright 1996, by M.H. Hayes.  For use with the book % "Statistical Digital Signal Processing and Modeling"% (John Wiley & Sons, 1996).%---------------------------------------------------------------x = x(:);N=length(x);eplus  = x(2:N);eminus = x(1:N-1);N=N-1;for j=1:p;      gamma(j) = -eminus'*eplus/(eminus'*eminus);      temp1    =  eplus  + gamma(j)*eminus;      temp2    =  eminus + conj(gamma(j))*eplus;      err(j)   =  temp1'*temp1;      eplus    =  temp1(2:N);      eminus   =  temp2(1:N-1);      N=N-1;      end;

⌨️ 快捷键说明

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