Convert Hexadecimal value to signed integer
이전 댓글 표시
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.
채택된 답변
추가 답변 (1개)
Ulrich Moser
2019년 3월 19일
0 개 추천
The typecast command worked very well for hex-strings. Thank you for providing this code!
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!