'Matlab Vitdec function implementation
I am using the following code for the implementation of convolutional code using matlab
cons_length=7
generator_poly=[171 133];
trpath=34;
poly = '24A';
dataIn = randi([0 1],1,N_BxP);
tbIn = nrCRCEncode(dataIn.',poly);
trel = poly2trellis(cons_length,[generator_poly]);
dataEnc = lteRateMatchConvolutional(codedcbs, Length_dataEnc).';
rateRec = lteRateRecoverConvolutional(dataDemod.',N_BxP)
trel = poly2trellis(cons_length,[gen_poly]);
decoded=vitdec(rateRec,trel, trpath,'cont','soft',3);
Just to say that rateRec consists of values like this -1.7018 -0.3755 0.4524 9.4121 -0.1610 0.1800 0.2524 -1.0731 -1.8816 0.0795 -2.4602 -2.2036 0.0415 -1.0967 1.0078 -0.4108 -0.5434 0.2701 0.6878 0.8257 -1.7155 -0.8709 0.0300 -0.2810 8.2568 -0.1436 -0.0657 -6.7162 4.4784 -4.2911 -0.0781 -0.3415 0.2059 -1.1142 4.0876 1.2382 -0.7907 -1.3802 2.8720 1.2596 -2.7989 -2.7493 0.3043 0.1299 3.2667 2.6796 14.4780 0.2189 0.3117 1.0459 -0.1915 -2.3378 -0.1176 -0.7231 -6.0025 -0.4837 -1.1506 -0.8879 -0.8992 6.2695 -0.2418 -3.3876 0.2047 -0.0290 0.4868 2.8566 2.5898 -4.6786 0.1462 0.7459 0.5473 0.1714 -0.6590 -3.8415 -0.6275 -1.0391 2.4783 0.0780 -0.9566 1.0141 0.0796 0.4242 -3.7200 -0.2354 0.0383 -0.1341 0.1131 -0.0775 -3.5422 0.8990 -2.1438 -2.7785 -1.0434 0.2204 -0.0526 0.3468 -0.8140 -6.3887 -1.9256 -0.0670 -0.2589 -0.2383 -2.0280 0.2896 -1.4117 -0.7039 1.0902 0.4206 -1.0687 -0.8485 -7.3176 -2.0153 0.3261 4.4434 -6.2526 -0.5168 -0.0570 1.8752 -2.4366 0.3086 -0.8003 -1.0237 0.1348 -2.8155 0.8851 -3.0306 0.5061 3.3568 0.2598 -0.8516 -1.5677 5.7550 -0.7004 0.5088 5.9704 0.0048 -0.0659 -0.4193 3.3207 -0.0678 0.5848 1.1707 3.2928 0.0223 -6.3225 -2.7085 -1.3176 -0.3441 But I am getting error in vitdec. I think I am not using it correctly. I have tried hard decoding with trunc but still gets error because hard decision only uses binary values.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
