Decimal to binary conversion
1 回表示 (過去 30 日間)
古いコメントを表示
Is there a way where i can convert 3 to '011' instead of just '11'.
I need it to compare the reveived code error.
This is what i want to achieve.
Eg: u='111' % real code
v='011' %received code;
Hamming_distance= 1.
0 件のコメント
採用された回答
Image Analyst
2019 年 11 月 25 日
Did you check the documentation for dec2bin()?
Try this:
d2b = dec2bin(3, 3); % returns '011'
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!