Description Usage Arguments Value Author(s) Examples
Decodes a convolutional codeword using hard decision decoding.
1 2 | ConvDecodeHard(code, conv.encoder = NULL, terminate = TRUE,
punctuation.matrix = NULL, visualize = FALSE)
|
code |
The code to be decoded. |
conv.encoder |
Convolutional encoder used for encoding. |
terminate |
flag If the code is terminated. |
punctuation.matrix |
If not null the code is depunctured prior to the decode algorithm. |
visualize |
If TRUE a beamer PDF file is generated showing the decode process. |
The hard-decoded message vector.
Martin Nocker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | coder <- ConvGenerateEncoder(2,2,c(7,5))
plain <- c(1,0,0,1,1)
# standard encoding and decoding with termination
coded <- ConvEncode(plain, coder)
ConvDecodeHard(coded, coder)
# without termination
coded <- ConvEncode(plain, coder, terminate = FALSE)
ConvDecodeHard(coded, coder, terminate = FALSE)
# with punctuation and visualization
# punctuation <- ConvGetPunctuationMatrix(c(1,1,0,1,1,0), coder)
# coded <- ConvEncode(plain, coder, punctuation.matrix = punctuation)
# ConvDecodeHard(coded, coder, punctuation.matrix = punctuation, visualize = TRUE)
# with message distortion
coded <- ConvEncode(plain, coder)
noisy <- ApplyNoise(coded, SNR.db = 3)
ConvDecodeHard(noisy, coder)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.