Decimal to binary conversion
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Shailee Yagnik
il 25 Nov 2019
Commentato: Shailee Yagnik
il 25 Nov 2019
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 Commenti
Risposta accettata
Image Analyst
il 25 Nov 2019
Did you check the documentation for dec2bin()?
Try this:
d2b = dec2bin(3, 3); % returns '011'
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Type Conversion 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!