The specified codeword length and message length are not valid with using encode hamming
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
i have this code to encode a 7 bit sequence to a 11 bit hamming code.
n = 11;
k = 7;
data = randi([0 1],k,1);
encData = encode(data,n,k,'hamming/binary');
but i get this error:
The specified codeword length and message length are not valid.
How can i solve this problem?
0 commentaires
Réponses (1)
Walter Roberson
le 10 Juin 2017
The formula works out such that you can only encode messages of length k if k = 2^n - n - 1 for some integer n. For example, messages of length 4 11 26 57 120 247 502 1013 2036 4083 ...
0 commentaires
Voir également
Catégories
En savoir plus sur Hamming dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!