How to discern if the codeword being sent in the C code is correctable?

2 visualizaciones (últimos 30 días)
I have written a function in MATLAB that creates a comm.RSDecoder object. I generate C code for this function and want to find out if the codeword being sent in the C code is correctable. Also, which variable should I look at to get this information?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 31 de Mzo. de 2024 a las 0:00
Editada: MathWorks Support Team el 31 de Mzo. de 2024 a las 20:59
The step() method of "comm.RSDecoder" has an optional second output (please refer to the first link below), which returns the number of corrected errors. If there is a decoding failure, "-1" will be returned in this ERR output argument. A "-1" value of this output indicates that the codeword is not correctable. This is explained in the details of the "NumCorrectedErrorsOutputPort" property in both the links below:
You need to change your step() call and specify this second output. For example:
>> [msg, numErr] = step(dec,codeword);
Then generate the C code and track down the C variable that corresponds to the "numErr" MATLAB variable.

Más respuestas (0)

Categorías

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

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by