⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsmatvec.m

📁 统计自适应信号处理的matlab程序
💻 M
字号:
function [R,d]=lsmatvec(method,x,M,y)
% function [R,d]=lsmatvec(method,x,M,y)
% Computes the MxM normal equations matrix
% and the right-hand side vector of the LS NE
% method='prew','post','full', or 'nowi'
% Programmed by Dimitris Manolakis, 6/1/97
%
%-----------------------------------------------------------
% 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);
d=zeros(M,1);

if method=='prew'
   x=[zeros(1,M-1),x']';
   y=[zeros(1,M-1),y']';
elseif method=='full'
   x=[zeros(1,M-1),x',zeros(1,M-1)]';
   y=[zeros(1,M-1),y',zeros(1,M-1)]';
elseif method=='post'
   x=[x',zeros(1,M-1)]';
   y=[y',zeros(1,M-1)]';
elseif method=='nowi'
end
   
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

if nargin==4
   for j=1:M
      d(j)=x(M:N)'*y(M+1-j:N+1-j);
   end
else
end  

   

⌨️ 快捷键说明

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