plotcapcmp.m
来自「压缩文件中是Error Correction Coding - Mathemat」· M 代码 · 共 37 行
M
37 行
% plot and compare the capacity of the AWGNC and the BAWGNC% Copyright 2004 by Todd K. Moon% Permission is granted to use this program/data% for educational/research onlysnr = 0.001:0.25:6.001; % signal to noise ratio of Ec/sigma^2cawgnc = [];cbawgnc = [];cbsc = [];for s = snr cawgnc = [cawgnc cawgnc2(s)]; cbawgnc = [cbawgnc cbawgnc2(s)]; p = qf(sqrt(s)); cbsc = [cbsc 1-h2(p)];endclfplot(snr,cawgnc);hold on;plot(snr,cbawgnc,'--');plot(snr,cbsc,'-.');xh = xlabel('E_c/\sigma^2');yh = ylabel('Capacity (bits/channel use)');axis([0 6 0 1.5])drawnowlh = legend('AWGNC Capacity', 'BAWGNC Capacity','BSC capacity');set(gca,'fontsize',15);set(xh,'fontsize',15);set(yh,'fontsize',15);set(lh,'fontsize',15);grid oninput('press return to save');print -dps capcmp.ps
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?