How to use decoding of binary LDPC as in Elec. Letters by MacKay&Neal 13March1997

1 view (last 30 days)
Hello, I want need to exploit "LDPC as in Elec. Letters by MacKay&Neal 13March1997" which wrote by Igor Kozintsev.
SNR=[-10:5];
for i=1:length(SNR)
sigma = 10^((-SNR(i))/20); % AWGN noise deviation
x = (sign(randn(1,size(G,1)))+1)/2; % random bits
y = mod(x*G,2); % encoding
z = 2*y-1; % BPSK modulation
z=z + sigma*randn(1,size(G,2)); % AWGN transmission
f1=1./(1+exp(-2*z/sigma^2)); % likelihoods
f1 = (f1(:))'; % make it a row vector
f0=1-f1;
[z_hat, success, k] = ldpc_decode_LR(y,f0,f1,H);
x_hat = z_hat(size(G,2)+1-size(G,1):size(G,2));
x_hat = x_hat';
Error(i)=length(find(x-x_hat))
end
But I have a problem to create G and H matrixes. is there any suggestion how I can create G and H matrixes. Now I have predefined matrixes which I extracting from this code: https://www.mathworks.com/matlabcentral/fileexchange/28437-simulating-2-2-mimo-ldpc-base-band-systems

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!