Borrar filtros
Borrar filtros

how to set ctr input for nrCRCEncoder

1 visualización (últimos 30 días)
DSP Solution
DSP Solution el 30 de Mzo. de 2023
Comentada: DSP Solution el 5 de Abr. de 2023
I tried to use nrCRCEncoder from 5G tool box, but I am not be able to set ctr input. Please help me

Respuestas (1)

Jack
Jack el 30 de Mzo. de 2023
The nrCRCEncoder function in the 5G Toolbox takes two inputs: in and crcGen:
out = nrCRCEncoder(in,crcGen)
The in input is the message bits to be encoded, and crcGen is the CRC generator polynomial in octal format. The CRC generator polynomial is defined by a vector of coefficients in decreasing order of powers, with the coefficient for the highest power of the polynomial equal to 1.
The ctr input that you are referring to is actually a third input to the function, which is optional. This input is used to set the initialization value of the CRC register, also known as the CRC counter, which is used in the CRC calculation.
If the ctr input is not provided, the CRC counter is initialized to all ones, which is the default initialization value.
To set the ctr input, you can provide it as a third input to the nrCRCEncoder function as follows:
out = nrCRCEncoder(in,crcGen,ctr)
where ctr is a scalar integer value representing the initialization value of the CRC counter.
For example, to set the CRC counter to a value of 0, you can call the nrCRCEncoder function as follows:
out = nrCRCEncoder(in,crcGen,0)
I hope this helps! Let me know if you have any further questions.

Categorías

Más información sobre Error Detection and Correction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by