corlnm2.m

来自「Least Mean Square Newton Algorithm」· M 代码 · 共 21 行

M
21
字号
function R=corlnm2(h,N)
%This function obtains the correlation matrix of the output
%of an FIR filter which is derived by a white noise, and its
%coefficients are given in vector "h".
%"N" specifies the dimensions of "R".
%
%	R=corlnm2(h,N)
j=sqrt(-1);
a=size(h);
if a(1)>a(2)
   h=h';
end
m=length(h);

for k=1:N
	if k<=m
		R(k)=h(k:m)*h(1:m-k+1)';
	else	R(k)=0; end
end
R=toeplitz(R);

⌨️ 快捷键说明

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