Best way to load c type hexidecimal data
1 view (last 30 days)
Show older comments
Hi,
is there an efficient method for loading c type hexidecimal data (e.g. 0x1.db0c0cp+3) from a text file? I need to load 2 dimensional data containing 5 columns of this type of data.
Using the "load" command from matlab on linux systems (either SLED 11 or Fedora 23 64 bit based) misreads the above number as 15.3452-- it should be 14.8452. Specifically creating a text file containing only the hex number above and then using load to open the text file in matlab gives the misread result. Windows based systems just load the data as zeros.
I have written a function which correctly parses the numbers, having opened the data using fopen, but it is painfully slow for large files (likely due to my poor coding).
Are there any alternative methods?
thanks
Mike
0 Comments
Answers (0)
See Also
Categories
Find more on String Parsing 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!