Date: Dec 3, 2012 3:57 PM
Author: Jared
Subject: Convoultional Coding/Decoding with Matlab Functions

I'm trying to perform convolutional coding/decoding using built in Matlab functions. I'm trying to implement (2,1,3) code.

K=3;
G1=7;
G2=5;
msg=[1 1 0 0 1 0];
trel=poly2trellis(K,[G1 G2]);
coded=convenc(msg,trel);
decoded=vitdec(coded,trel,5*K,'cont','hard');

coded=[1 1 0 1 0 1 1 1 1 1 1 0]
decoded=[0 0 0 0 0 0]

As you would expect, the decoded message should be the same as msg, which it is not. I don't see where I have gone wrong in this simple example.