Matlab中求自相关矩阵的方法
背景:学习自适应滤波算法,遇到步长的选择需要参考自相关矩阵的特征值。步长u的范围是(0,1/emax),其中的emax是参考输入信号的自相关矩阵的最大的特征值。
在网上那个查了很多,感觉最靠谱的就是下面的程序。其他的说法很多都有错误。
以下内容参考http://bbs.matwav.com/viewthread.php?tid=872470
%%
法1:采用toeplitz+xcorr的方法;
% x=[1,2,3,4];
% m=3 ;�fine the time lag
m+1, and m+1<=n;
% n=length(x);%location of
rxx(0);
% rx=xcorr(x)%length of rx is
2*n-1;
% Rxx=toeplitz(rx(n:n+m))/n
%% 法2:采用corrmtx函数
x=[1,2,3,4];
m=3;�fined the time lag
m+1,and m+1<=n
rx=corrmtx(x,m)
Rxx=rx'*rx
src:http://hi.baidu.com/xf19890224/item/1beaf32a98a7dcc8ee10f1c7