Real value to binary
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How can i convert my real value to binary digits?
For example; i have values within [0,25] range and 15 binary digits to represent a variable.(4 variables totally)
How can i do that and also reverse of that?
3 Commenti
Walter Roberson
il 11 Mag 2012
3 decimal places requires 10 bits to resolve (2^(-10) = 1/1024)
You get slightly better resolution if you use 2^10 than if you use 10^3. It depends though on whether resolution is your goal or if "3 decimal places" is your goal.
Risposta accettata
Più risposte (3)
Honglei Chen
il 11 Mag 2012
Are you asking things like dec2bin and bin2dec?
x = 20;
dec2bin(20,15)
0 Commenti
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!