필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
sb
sb 2016년 6월 10일
답변: busra tegin 2018년 6월 12일
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'

답변 (1개)

busra tegin
busra tegin 2018년 6월 12일
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.

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by