lsmatrix.m

来自「<统计智能信号处理>一书的matlab源程序」· M 代码 · 共 32 行

M
32
字号
function R=lsmatrix(x,M)
% function R=lsmatrix(x,M)
% Computes the MxM normal equations matrix
% for the residual windowing case (no windowing)
%
% Programmed by Dimitris Manolakis, 10/4/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.
%-----------------------------------------------------------



R=zeros(M,M);
N=length(x);

for j=1:M
   R(1,j)=x(M:N)'*x(M+1-j:N+1-j);
   R(j,1)=R(1,j);
end  

for i=2:M
   for j=i:M
      R(i,j)=R(i-1,j-1)+x(M+1-i)*x(M+1-j)-x(N+2-i)*x(N+2-j); 
      R(j,i)=R(i,j);
   end
end

⌨️ 快捷键说明

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