ASCII to Hexadecimal with "x" in it: example A2--> 0x410x32 (help pleas)
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
My question is : is it possible to transform ascii code into hexadecimal with the forme "Ox" before. For instance A2 become in Hexa, 0x410x32. But with matlab, if I use dec2hex I obtain a matrix. Same with the commande "double". Have you any idea to transform the ascii code into the way I want ? Does your solution can be included in a fprintf command ? Best regards Stanislas Achard
1 comentario
Respuesta aceptada
Cedric
el 25 de En. de 2013
I would just go for a variant of:
>> str = 'A2A2AA22' ;
>> strhex = sprintf('0x%X', str)
strhex =
0x410x320x410x320x410x410x320x32
3 comentarios
Más respuestas (0)
Ver también
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!