Hi guys, I've a message in binary that's an output of convolutional encoder that its parameters is k=7 , r=1/2.
So Im trying to implement a viterbi decoder which I've seen that matlab provide already built viterbi decoder and Im trying to use it but apprently Im getting wrong decoded message. my code of viterbi decoder in matlab is: (the input is encoded message which it's the output of convolutional encoder that its parameters is k=7 , r=1/2).
function ViterbiDecoderMsg= ViterbiDecoder(encodedmsg)
constlen = 7;
codegen = [171, 133];
trellis = poly2trellis(constlen, codegen);
tblen = length(encodedmsg) /2 ;
Im getting wrong decoded message , could anyone pelase help me if my viterbi decoder with k=7 and r=1/2 that I use is correct? I mean the parameters of using poly2trellis and vitdec functions.
Second question, how can I use Viterbi Decoder with soft decision in my case? I tried to write instead of 'hard' -> 'soft'
it didn't work, a pleasure if anyone could help me how can I use soft decision with Viterbi decoder of matlab.
thanks alot for any help guys!