Help on conversion of data
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Please help me on it
- if i have 3 column of data
- convert the data to binary 4 bit
- concat it to one data to make 12 bits
- transpose the concated data
- and take it as input.
Thanks
6 comentarios
Respuestas (2)
Walter Roberson
el 21 de Oct. de 2015
1 comentario
Walter Roberson
el 21 de Oct. de 2015
dec2bin( floor(A(:,1) * 16) * 256 + floor(A(:,2) * 16) * 16 + floor(A(:,3) * 16), 12) - '0'
Thorsten
el 21 de Oct. de 2015
Editada: Thorsten
el 21 de Oct. de 2015
With 4 bits you can code 32 numbers, like the integers from 0 to 31. You cannot convert double precision numbers between 0 and 1 to 4 bit without loss. One way to convert would be to multiply by 32 and then use dec2bin.
6 comentarios
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!