conversion of binary to decimal

7 Ansichten (letzte 30 Tage)
ablaze
ablaze am 29 Mär. 2017
Kommentiert: Raed Alaa am 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 Kommentar
Raed Alaa
Raed Alaa am 15 Nov. 2021
code matlab how to convert from binary to decimal

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

David Goodmanson
David Goodmanson am 29 Mär. 2017
Bearbeitet: David Goodmanson am 29 Mär. 2017
Hi ablaze, Your code has bin2dec trying to convert a string containing the word 'binary'. Try
a = '1011'
bin2dec(a)
  3 Kommentare
ablaze
ablaze am 29 Mär. 2017
thank u
Favour Oghenekowho
Favour Oghenekowho am 2 Jul. 2021
Hi, how can I convert Hexadecimal to excess 3 code using Matlab?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by