www.pudn.com > 7894509matlab.rar > ldpc_generate.m, change:2000-05-09,size:712b


function [H] = generate(M,N,t,q,seed) 
%[H] = generate(M,N,t,q,seed) 
% generates sparse LDPC parity check matrix over GFq 
% (first H for GF2 is generated, then elements of GFq are created at random) 
% Input:  
%  M      number of parity checks 
%  N      blocklength 
%  t      mean column weight 
%  q      GF base (power of 2) - now 2 4 8 16 32 64 128 256 only 
%  seed   initializes random generator - we use MATLAB 5 uniform generator 
%MEX file 
% C code is based on Davey&MacKay code http://wol.ra.phy.cam.ac.uk/mackay/codes/ 
%   (sparse.c) with the author's permission 
% 
% Example 
%           [H] = ldpc_generate(4512,6112,2.3,2,123); 
 
%   Copyright (c) 1999 by Igor Kozintsev igor@ifp.uiuc.edu