Why does IMPORTDATA or LOAD read in HEX files incorrectly in MATLAB?
Show older comments
I have a .HEX file containing these values:
0x0C50 0xDA82 0xFFFF 0xF3D2 0x3D60 0x803E
When I try to read this hex data using the "load" function and convert it to decimal on a Windows machine, the data values starting with '0xD' are read as '0xE' when converted to decimal. For example, I call
load('test.hex')
where "test.hex" is the file which contains the above hex data. The output of the statement is
3152 60034 65535 62434 15968 32830
However, the data should be
3152 55938 65535 62418 15712 32830
Why does MATLAB not import the data from a HEX file as expected?
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!