?? llssigest.m
字號:
function [c,e,V,FPE]=llssigest(x,M,method)
% Linear least-squares (LS) signal estimation using
% residual windowing (No-Windowing)
% linear least-squares ( for smoothing applications use M=2L)
% Smoothing ('sm'): [c(0)...c(L-1) 1 c(L+1)...c(M)]
% Symmetric smoothing ('ss'): [c(0)...c(L-1) 1 c(L-1)...c(0)]
% Forward/Backward linear prediction ('fb'): [1 a(1) ... a(M)]
%
% V=estimation error variance.
% FPE=Akaike's final prediction error criterion
%
% Programmed by: Dimitris Manolakis, 17/10/96
%
%-----------------------------------------------------------
% 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);
e=zeros(Lx,1);
R=zeros(M+1,M+1);
d=zeros(M,1);
c=zeros(M+1,1);
c1=zeros(M,1);
R=lsmatrix(x,M+1);
if method=='sm'
L=M/2;
d=-R(:,L+1);
d(L+1)=[];
R(:,L+1)=[];
R(L+1,:)=[];
c1=R\d;
c(1:L)=c1(1:L);
c(L+1)=1;
c(L+2:M+1)=c1(L+1:M);
e=smooth(c,x);
elseif method=='ss'
L=M/2;
Rs=R(1:L,1:L)+flipud(R(1:L,L+2:M+1)')+...
fliplr(R(1:L,L+2:M+1))+flipud(fliplr(R(L+2:M+1,L+2:M+1)));
d=-R(1:L,L+1)-flipud(R(L+2:M+1,L+1));;
c(1:L)=Rs\d;
c(L+1)=1;
c(L+2:M+1)=flipud(c(1:L));
e=smooth(c,x);
elseif method=='fb'
R=fliplr(flipud(R))+R;
d=-R(2:M+1,1);
R(:,1)=[];
R(1,:)=[];
c1=R\d;
c=[1 c1']';
e=filter(c,1,x);
e(1:M)=zeros(M,1);
else
end
V=(e'*e)/(Lx-M);
FPE=V*(1+M/Lx)/(1-M/Lx);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -