www.pudn.com > yuyinxinhaochulisuanfa.rar > acormx.m


function R=acormx(X,M) 
% returns (M+1) by (M+1) autocorrelation matrix of X. 
% The function calls the function acorrl() to computer the autocorrelation 
% R=acormx(X,M) 
%     X --> input signal 
%     M --> the order of the autocorrelation matrix is M+1 
%     R <-- autocorrelation matrix 
% 
% The autocorrelation matrix is as follows: 
%              [      r(0) ]   [  r(1)      ]  ...... [  r(M)     ] 
%              [ conj(r(1))]   [  r(0)      ]  ...... [  r(M-1)   ] 
%       R=     [ conj(r(2))]   [ conj(r(1)) ]  ...... [  r(M-2)   ] 
%                 ......          ......       ......     ...... 
%              [ conj(r(M))]   [conj(r(M-1))]  ...... [  r(0)     ]  
%  
% See also : ACORRL 
 
% Copyright by Zhilin Zhang, Hanlin Laboratory 
% $ Revision: 1.0 $  $ Date: 2003/04/02  01:31 $  
 
 
r=acorrl(X,M,'half');               % call function acorrl() 
R=zeros(M+1); 
R(1,:)=r(1:M+1); 
for i=2:M+1 
    R(i,:)=[conj(r(i:-1:2)),r(1:M+2-i)]; 
end