conversion of binary to decimal

3 visualizaciones (últimos 30 días)
ablaze
ablaze el 29 de Mzo. de 2017
Comentada: Raed Alaa el 15 de Nov. de 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 comentario
Raed Alaa
Raed Alaa el 15 de Nov. de 2021
code matlab how to convert from binary to decimal

Iniciar sesión para comentar.

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by