The specified codeword length and message length are not valid with using encode hamming
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Walter Roberson
2017 年 6 月 10 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Hamming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!