0% found this document useful (0 votes)
9 views1 page

Linear Block Code Encoding/Decoding

The document performs channel coding and decoding using a generic linear block code with a noise-free channel. It defines the parameters for a (6,3) linear block code with generator matrix P and constructs the generator and parity check matrices. It then encodes a message vector, displays the encoded and received codewords, and decodes the received word to retrieve the original message.

Uploaded by

madhurithk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Linear Block Code Encoding/Decoding

The document performs channel coding and decoding using a generic linear block code with a noise-free channel. It defines the parameters for a (6,3) linear block code with generator matrix P and constructs the generator and parity check matrices. It then encodes a message vector, displays the encoded and received codewords, and decodes the received word to retrieve the original message.

Uploaded by

madhurithk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

clc;

clear all;
n=6; k=3;

P=[1 1 1; 1 1 0; 1 0 1 ];
genmat = [P,eye(k)]; %generated matrix%
parmat = [P,eye(n-k)]; %parity check matrix%

msg = [0 1 1 1 0 1 1 1];
msg_encoded = encode(msg,n,k,'linear',genmat);
%trt = syndrable(parmat); %produce decoding table
recd = [0 1 1 0 1 0;0 1 0 1 0 1; 0 0 1 1 0 0];
msg_decoded = decode(recd,n,k,'linear',genmat);
disp('channel coding/decoding using generic LBC-Noise free channel:');
disp(' ');
disp('original msg after source coding:');
disp(msg);
disp('Transmitted message');
disp(msg_encoded);
disp('receieved message :');
disp(recd);
disp('decoded message :');
disp(msg_decoded);

You might also like