Convert Hexadecimal value to signed integer
Mostrar comentarios más antiguos
Hi, I have a .bin file in which data is stored in hexadecimal format. I want to do the following:
1. Read the hexadecimal data from the .bin file.
2. Convert the data into signed integer. For instance, if we have FF5C in the file, I want to read it and convert it into its corresponding signed integer representation which is -164.
Could anyone please show me the code to do so. Thank you in advance.
Respuesta aceptada
Más respuestas (1)
Ulrich Moser
el 19 de Mzo. de 2019
0 votos
The typecast command worked very well for hex-strings. Thank you for providing this code!
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!