0

I am trying to read accelerometer data from a csv file in matlab using xlsread with [num text raw] .However,the raw field only gives [NaN] instead of the text and character data that I am expecting.How can this be rectified? Any other ways to read hexadecimal data from a csv file?? Thanks in advance!

1 Answers1

2

Hex is going to be an issue if you are attempting to read into an numeric array.

What you should do is use the table variable, read the item in and then use hex2dec

a=readtable(filename)
a.(1)=hex2dec(a.(1)) %column that has your hex numbers in it
zglin
  • 2,891
  • 2
  • 15
  • 26