How to discern if the codeword being sent in the C code is correctable?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 9 Nov 2017
Modificato: MathWorks Support Team
il 31 Mar 2024 alle 20:59
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?
Risposta accettata
MathWorks Support Team
il 31 Mar 2024 alle 0:00
Modificato: MathWorks Support Team
il 31 Mar 2024 alle 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.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Error Detection and Correction in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!