Professional Documents
Culture Documents
trellis=poly2trellis(k,[4 5 7])
trellis_encoded =convenc(m,trellis)
%%DECODING
decode=vitdec(code,trellis,k,'trunc','hard')
%%% OUTPUT%%%
enter the constraint length: 3
k =
3
enter the message bits: [1 1 0 1 1]
m =
1 1 0 1 1
v =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
o =
1 1 0 1 1
1 1 1 0 1
1 0 0 0 0
encoded_output =
Columns 1 through 12
1 1 1 1 1 0 0 1 0 1 0 0
Columns 13 through 15
1 1 0
trellis =
numInputSymbols: 2
numOutputSymbols: 8
numStates: 4
nextStates: [4x2 double]
outputs: [4x2 double]
trellis_encoded =
Columns 1 through 12
1 1 1 1 1 0 0 1 0 1 0 0
Columns 13 through 15
1 1 0
decode =
1 1 0 1 1