Function fileread reads some values wrong
显示 更早的评论
I'm triying to read text from a file (extension .ubx, file attached ) into a matrix A . For this i'm using the follwing line of code
A = fileread([filepath filename]);
Basically this is working. But all characters with hex value 0x96 in the original file, matlab reads wrong value of hex 0xFF in matrix A.
This behavior occured with Matlab R2015a , R2015b , R2016a on Windows 10. But with Matlab R2015b and R2016a on Apple Macbook, everything works correctly.
To display matrix A in hex format, i use the command
format hex
uint8(A)
Does anybody know what i did wrong? I also tryed the command textread, but this gave the same result.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!