部分源代码
close all;clear;clc;SNR_dB_a = 0:2:10;SNR_dB_b = 0:0.1:10;% simulationvalue_simulation = SNR2Pe(SNR_dB_a);% theorySNR_b = 10.^(SNR_dB_b / 10);value_theory = 1/2 * erfc(sqrt(SNR_b / 2));% plotsemilogy(SNR_dB_a, value_simulation, 'X');hold on;semilogy(SNR_dB_b, value_theory);xlabel('SNR(dB)');ylabel('Pe');legend('simulation', 'theory');function code = CodeGenerator(N) % Generate N 0 or 1 codes for i = 1:N temp = rand; if temp < 0.5 code(i) = 0; else code(i) = 1; end endend1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.
2014a
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删