www.gusucode.com > MC-CDMA系统的仿真matlab源码程序 > mc-cdma/rayleigh(移动信道)/pilotcomp.m
%%********************************************************************* %%%% M.1225信道下,ML估计,不同导频数目的比较 %%%******************************************************************** clear fc=3.5e9; % operation frequency V=75; % moving speed, V km/h fdmax=V*fc/3e8/3.6; % maximum frequency shift: fmax=V*fc/C numusers=4; wordsize=2; % represent the mode of modulation, wordsize=2:QPSK, wordsize=4:16QAM, wordsize=6:64QAM; Numsymb=100; % the number of symbols [ber1,berreal,mse1]=ML_16(numusers,wordsize,Numsymb,fdmax); % ML estimation using 16 pilots [ber2,berreal,mse2]=ML_20(numusers,wordsize,Numsymb,fdmax,sqrt(2)); % ML estimation using 20 pilots [ber4,berreal,mse4]=ML_32(numusers,wordsize,Numsymb,fdmax); % ML estimation using 24 pilots figure subplot(1,2,1) k=0:5:30; semilogy(k,ber1,'-ms') hold on semilogy(k,ber2,'-r*') semilogy(k,ber4,'-go') semilogy(k,berreal,'-.b') grid on axis([0 30 10^(-4) 1]) xlabel('SNR/dB'),ylabel('BER') legend('16','20','32','理想') set(gcf,'color',[1,1,1]) subplot(1,2,2) semilogy(k,mse1,'-ms') hold on semilogy(k,mse2,'-r*') semilogy(k,mse4,'-go') grid on axis([0 30 10^(-4) 1]) xlabel('SNR/dB'),ylabel('MSE') legend('16','20','32')