How to generate Generator Matrix for a known LDPC Parity check matrix

Status
Not open for further replies.

ameynaik1989@gmail.com

Newbie level 2
Joined
Oct 22, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
Hi all,

We know how to generator G from H and vice versa using MATLAB function
parmat = gen2par(genmat)
genmat = gen2par(parmat)

But this is valid only if the format is as below.

Type of Matrix Standard Form Dimensions
Generator [Ik P] or [P Ik] k-by-n
Parity-check [-P' In-k] or [In-k -P' ] (n-k)-by-n

https://www.mathworks.in/help/comm/ref/gen2par.html

But What if My parity matrix is not of form [-P' In-k] or [In-k -P' ]. What if sub matrix which is an Identity matrix of order n-k doesn't exist?
How do I generate generator Matrix from such Parity check matrix using MATLAB.

This is particularly a concern because LDPC Parity check matrix is huge. So need Matlab help.

Is there a way to convert my Parity check Matrix [H] in [-P' In-k] or [In-k -P' ] this form in MATLAB?

Thanks.
 

hi.u can use this function:
if G=[I D] that I is a identity matrix:
Code:
function [b]=inv_GF2(A)
%Ainv=inv_GF2(A)

dim=size(A);
rows=dim(1);
cols=dim(2);

for i=1:rows
   for j=1:rows
      unity(i,j)=0;
   end
   unity(i,i)=1;
end

for i=1:rows
   b(1:rows,i)=gflineq(A,unity(1:rows,i));
end


H=[h1 h2];
[m,n]=size(H);
 A(1:m,1:m)=H(1:m,1:m);
 B(1:m,1:m)=H(1:m,m+1:n);
 
d=mod(inv_GF2(B)*A,2); 
I=eye(m);
G=[ I d'];
 
Reactions: ali_

    ali_

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…