ip_07_08.m
上传用户:loeagle
上传日期:2013-03-02
资源大小:1236k
文件大小:1k
- % MATLAB script for Illustrative Problem 7.8.
- echo on
- SNRindB1=0:2:15;
- SNRindB2=0:0.1:15;
- for i=1:length(SNRindB1),
- smld_err_prb(i)=cm_sm52(SNRindB1(i)); % simulated error rate
- echo off ;
- end;
- echo on ;
- for i=1:length(SNRindB2),
- SNR=exp(SNRindB2(i)*log(10)/10); % signal-to-noise ratio
- theo_err_prb(i)=(1/2)*exp(-SNR/2); % theoretical symbol error rate
- echo off;
- end;
- echo on;
- % Plotting commands follow.
- semilogy(SNRindB1,smld_err_prb,'*');
- hold
- semilogy(SNRindB2,theo_err_prb);