The Program to test the girth 4 of Gallager LDPC codes
Copyright (C) Yang XIAO, BJTU, July 26, 2007, E-Mail: email@example.com,
The program analyzes the girth 4 for Gallager LDPC codes. The figures show
the parity check matrix H and the girth test matrix O, respectively.
Fig 1 can help us know the 1s’ distribution of the parity check matrix H.
Fig. 2 is the result of girth 4 for the given H.
Theorem in Ref : The H matrix has no gith4, if and only if the O matrix in Fig.2 has no entry value to be larger than 1.
 Y. Xiao, M -H Lee, “Low complexity MIMO-LDPC CDMA systems over multipath channels”,
IEICE Transactions on Communications, v E89-B, n 5, May, 2006, p 1713-1717
 J. Fan, Y. Xiao, “A method of counting the number of cycles in LDPC codes”,
8th International Conference on Signal Processing, ICSP 2006,Volume: 3,
ISBN: 0-7803-9737-1, Digital Object Identifier: 10.1109/ICOSP.2006.345906
 MOHAMMED ALKHANBASH, Gallager LDPC, Matlab center, File Exchange, 2007
The papers  and  can be downloaded from Web site of IEICE and IEEE Explore.
Hello Sir, could you please guide on how to construct a code to eliminate any girth-4 cycle in a parity-check matrix?
I have just started to learn LDPC.
Thank you for giving the simple m-file to test girth 4 cycle. It is very useful for me and my program .....
Reply to Mr. Arash Saber:
My program is only to show that the published Gallager codes have girth 4, the problem is ignored by many LDPC learners.
From your comment, I suppose, you may not know the girth 4 problem of LDPC codes.
Is this your first time writing a program?
- Script file
- Contains the 'clear' command
- Useless data is not supressed by a semicolon
- No pre-allocation of growing arrays.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.