binary matrix to decimal number
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Abduellah Elbakoush
il 21 Gen 2022
Commentato: Abduellah Elbakoush
il 21 Gen 2022
I have binary matrix the dimensions of matrix (1*8) like this
1 0 1 1 0 0 1 0
I want to put that matrix into another matrix the dimensions of new matrix is ( 1*1) like this
10110010
then I want to conver into decimel number like this
178
Can you help me to do this problem
0 Commenti
Risposta accettata
Più risposte (1)
Simon Chan
il 21 Gen 2022
Try this:
A = logical([1 0 1 1 0 0 1 0]);
B = bin2dec(num2str(A))
1 Commento
Vedere anche
Categorie
Scopri di più su Import, Export, and 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!