Convert an array of type char to hex values
76 views (last 30 days)
Walter Roberson on 31 Jul 2021
I showed you a number of different methods in https://www.mathworks.com/matlabcentral/answers/888752-quickest-way-to-convert-hex-to-a-16-bit-signed-integer#answer_756857 and showed timings of each.
The edit I just made, to use a lookup table, is the fastest method yet, more than 50 times faster than dec2hex()
dpb on 31 Jul 2021
I went back and found your first posing of roughly a week ago -- and made a comment there.
In short, take Walter's advice from back then and use either textscan for fscanf or readmatrix and do the conversion on input inside the C i/o library instead.
Not being willing to share anything; even a dummy-data file of typical structure pretty-much limits how much more specific can get.