main.m
来自「本程序是一个将LDPC编码应用到MATLAB中的程序」· M 代码 · 共 67 行
M
67 行
% This program computes Tables 1-5 of Oswald/Shokrollahi% "Capacity-achieving sequences for the erasure channel"% NOTE: Not all these tables have found their way into the% final version of the paper.%% Author: P. Oswald% Last changed: 10/4/2002family=input('Table number 1-4: ');R=input('Rate: ');table=[];if family==1 param=input('Table 1: Vector of a-values: '); L=length(param); for i=1:L a=param(i); [degrees,rho,lambda,stats]=CompLeftExp(R,a); table=[table; [degrees a stats]]; end format short; degrees=table(:,1:5) format long; stats=table(:,6:10) format short; endif family==2 param=input('Table 2: Vector of n-values: '); L=length(param); for i=1:L n=param(i); [degrees,lambda,stats]=CompLeftPoly(R,n); table=[table; [degrees stats]]; end format short; degrees=table(:,1:4) format long; stats=table(:,5:9) format short; endif family==3 param=input('Table 3: 2x? Array of [c;n]-pairs: '); L=size(param,2); for i=1:L c=param(1,i);n=param(2,i); [degrees,lambda,stats]=CompLeftPoly2c(R,c,n); table=[table; [degrees c n stats]]; end format short; degrees=table(:,1:6) format long; stats=table(:,7:11) format short; endif family==4 param=input('Table 4-5: 2x? Array of [b;n]-pairs: '); L=length(param); for i=1:L b=param(1,i);n=param(2,i); [degrees,rho,lambda,stats]=CompLeftSelf(R,b,n); table=[table; [degrees b n stats]]; end format short; degrees=table(:,1:6) format long; stats=table(:,7:11) format short; end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?