www.gusucode.com > MPSK,误码率性能仿真源码程序 > MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/computeL.m

    % this function computes the lowe triangular Matrix L with N*N dimension, 
% using Cholesky factorization of C^-1
% for detail see paper [1]
% C= E{hh'}+sigma2*I
% E{h(k+n)h*(k)}=sig_1*sig_2*J0(2*pi*fsr*n)*J0(2*pi*frd*n)
% C^-1=L*Lh

function Lh=computeL(P0,A2,N0,N,fsr,frd,ch_dis,sig_1,sig_2)
% N is the dimention of matrix  
% fsr and frd  normalized fading bandwidth
% N0 is AWGN noise variance

sigman2=(1+A2*sig_2)*N0;

% Double-Rayleigh fading autocorrelation function, Jakes model
k=0:ch_dis:(N-1)*ch_dis;
phi=A2*P0*sig_1*sig_2*besselj(0,2*pi*fsr*k).*besselj(0,2*pi*frd*k);

% Correlation matrix C=E{hh'}+sigma2*I is a Toeplitz matrix
C=toeplitz(phi)+sigman2*eye(N);

% inverse of correlation matrix
Cinv=inv(C);

% Cholesky decomposition: R'*R=A, R=chol(A)
Lh=chol(Cinv);

end