conversion of binary to decimal
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
ablaze
il 29 Mar 2017
Commentato: Raed Alaa
il 15 Nov 2021
binary=1011 decimal=bin2dec('binary')
this code shows a error - Error using bin2dec Binary string may consist only of characters 0 and 1
Is there is method for conversion of binary to decimal through passing a variable which consists binary numbers?????
1 Commento
Risposta accettata
David Goodmanson
il 29 Mar 2017
Modificato: David Goodmanson
il 29 Mar 2017
Hi ablaze, Your code has bin2dec trying to convert a string containing the word 'binary'. Try
a = '1011'
bin2dec(a)
3 Commenti
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!