Filter löschen
Filter löschen

I am trying to make a parity check matrix from non-systematic to systematic.

1 Ansicht (letzte 30 Tage)
sb
sb am 10 Jun. 2016
Beantwortet: busra tegin am 12 Jun. 2018
I am trying to make a parity check matrix from non-systematic to systematic. Hence, I am attaching my code below. Somewhat it is correct, but there are some problems. It would be really great if someone could help me in this. Subject: Information theory and coding. I am working on LDPC coding and decoding. Please check the code below
MATLAB CODE
H=[1 0 1 1 0; 0 0 1 0 1; 1 0 0 1 0; 1 0 1 1 1]
[m,n]=size(H);
k=n-m;
for i=k+1:n
%H(:,i)
ind=find(H(:,i),1,'last');
% exchanging (ind)th row and (i-k)th row
if ind<i-k
continue;
end
if ind~=i-k
temp=H(ind,:);
H(ind,:)=H(i-k,:);
H(i-k,:)=temp;
end
I=find(H(:,i));
% Guassian elimination
for j=1:length(I)
if I(j)~=i-k
H(I(j),:)=mod(H(I(j),:)+H(i-k,:),2);
end
end
end
Hsys=H
For e.g.
This is my H matrix
H =
1 0 1 1 0
0 0 1 0 1
1 0 0 1 0
1 0 1 1 1
I want to have an identity matrix inside the matrix. the dimension on H matrix here is (mxn) which is (4x5).
I should have matrix as this in the result:
Hsys =
0 1 0 0 0
0 0 1 0 0
1 0 0 1 0
0 0 0 0 1
enter image description here
I should have an identity matrix of dimension 'm'

Antworten (1)

busra tegin
busra tegin am 12 Jun. 2018
Maybe I'm so late in answering, but your code works well with full rank parity check matrices (I did not check the code line by line, there may be still some mistakes). In your example, H is not full rank (its rank is 3), so you cannot obtain an idendity matrix of 4 by 4 with Gaussian elimination.

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by