Here are several programs written in C and Matlab scripts for the analysis and simulation of
various
linear block codes over BSC, AWGN and Rayleigh fading channels. This is
the topic of Chapter 1 of the book.

Matrices_BCH

Weights_BCH

Simulation of BPSK modulation over an AWGN channel:

sim_bpsk.m which also needs Q.m

Use of the Hamming bound to determine minimum redundancy n-k, given k and t:

minred.m

Use of the Hamming bound to determine maximum t, given k and redundancy n-k:

maxt.m

**Simulation of a (6,3,3) linear code, over BSC, AWGN and Rayleigh
fading channels:**

633_awgn.c

633_awgn_hdd.c

633_rayleigh.c

**Weight distribution of a linear code given its generator matrix
in an input file:**

WD_linear_code.c

100110

010011

001101

Compute the weight distribution and union bound of a binary linear code and union bound for binary transmission over an AWGN channel:

WeightDistribution.m

**Another C program to find the weight distribution of a binary linear
code given a generator matrix (better user interface, no prompt):**

find_weights.c

**Bounds on the probability of a block error (WER) and a bit error
(BER) for binary linear codes with binary transmission over a Rayleigh
fading channel:**

WER_Chernoff.c

WER_MC_union.c

BER_Chernoff.c

BER_MC_union.c

**Union bound on the word error probability (WER) for a binary
linear block code over a BSC channel:**

bound_pe.c

**Bounds on the probability of a bit error for a linear code with soft-decision
and hard-decision decoding with binary transmission over an AWGN channel:**

bound_awgn_ebno.c

bound_hdd_awgn.c

**Bounds on the bit error probability of the memory-2 rate-1/2 convolutional
code discussed in the book:**

bound_rate12_bsc.c

bound_rate12_bsc_best.c

bound_rate12_bsc_meeberg.c

**Evaluation of the undetected error probability of a binary linear
(4,2,2) code, Equation (1.27) in the book:**

bound_undetect_422.c

**Bounds on the probability of error of a repetition code over an AWGN
channel and a Rayleigh fading channel, with soft decision decoding, as
well as probability of error with hard-decision over an AWGN channel:**

bound_313.c

pe313_rayleigh.c

pe_313_hd_awgn.c

**Simulation of a repetition (3,1,3) code over a binary symmetric channel:**

simulation313.c

MLdecoder_313code.m

Decoding of a binary (4,2,2) code over an AWGN channel:

MLdecoder_422code.m

**Probability of decoding error (block error) for a binary code with
binary transmission over an AWGN channel and hard-decision decoding:**

pe_hdd_awgn.c

**Exact probability of error with standard array decoding of binary
linear codes:**

pe_std_array.c

**Evaluate error probabilities for an RS code:**

prob_error_RScode.c

prob_dec_error_rs.c