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
  • If you find this answer helpful, please click the accept check box. Commented Aug 16, 2016 at 14:04

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.