How to encode uplink channel using 5G polar code?

E
Ethel Marquer · Feb 1, 2023 · 2.3K views
Question
Hello, I am testing different configurations for polar code generation using the example NewRadio5GPolarCodingExample.m provided by the 5G Library for LTE System Toolbox. In The case of an uplink channel, it is defined in the standards to set the code parameters as follow:     crcLen = 11; % Number of CRC bits for UL payload K >=20 nPC = 0; % No parity check bits nMax = 10; % iIL = false; % No bit interleaver prior to encoding iBIL = true; % Interleave coded bits Regarding the message to encode, I configured: K = 54; % Message length in bits E = 124; % Rate matched output length, E <= 8192 When running the script I get the error:   Error using coder.internal.assert (line 33) The input X must be of length equal to the MessageLength.   I wonder if the crcLen = 11 is supported because when I tried the same configuration with crc=24 it was working fine.
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 24, 2026

Within the script NewRadio5GPolarCodingExample.m (line 223), please also update the CRC polynomial for the fcn call h5gCRCEncode to '11' from '24C', to match the uplink configuration. The code should run with the re-defined parameters.

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!