I am looking for a simple way to convert from c-code hex array to matlab
Available C-Code Format: const uint16_t AUDIO_SAMPLE[] = {0x4952, 0x4646, 0x4f6e, 0xf, 0x4157, 0x4556, 0x6d66, 0x2074, 0x12, 0, 0x1}
Required Matlab Format: AUDIO_SAMPLE = [18770 17990 20334 15 16727 17750 28006 8308 18 0 1]
Though it is simple to convert for small numbers, I have to convert a very big array. I am using embedded platform so the numbers can not be written to a simple text file for later read in matlab. Its preferable to write the conversion code in matlab.
Edit:
Till now able to get rid of 0x. Failed to get a vector after using eval function as given below:
a='0x4952, 0x4646, 0x4f6e'; %Given
b = strrep(a, '0x', '') ; %Returns 4952, 4646, 4f6e
x = eval( [ '[', b, ']' ] ) %