Borrar filtros
Borrar filtros

Real Value Conversion to Binary with Range

5 visualizaciones (últimos 30 días)
b
b el 11 de Mayo de 2012
Again, i write on the same topic. Sorry for that.
Within the range values (e.g. [0,25]) how can i convert my real numbers to binary digits. The number of bits must be 15..
Thanks

Respuesta aceptada

Walter Roberson
Walter Roberson el 11 de Mayo de 2012
dec2bin(round(Values * 2^10), 15) - '0'

Más respuestas (1)

b
b el 11 de Mayo de 2012
Thanks again.
Do you have any idea to convert the binary digits to real values??
  1 comentario
Walter Roberson
Walter Roberson el 11 de Mayo de 2012
Let B be the binary digits. Then
bin2dec(char(B + '0')) ./ 2^10

Iniciar sesión para comentar.

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