excel - How do I tell Matlab that some of the data which is being imported is in Hex? -


i trying import data excel sheet in there 3 columns (time; id; , data).

the first column contains time (in seconds) while next column has numbers (id). third column (data), however, has hexadecimal numbers, therefore matlab unable process information , shows 'nan' in command window/structure whenever try retrieve information third column.

i want create structure each ids , display respective information inside id.

hence there anyway obtain information third column without getting nan error?

here's code:

[dat1, dat2, dat3] = xlsread('1'); flds=dat3(1,:); bus=cell2struct(dat3(2:end,:),flds,2);  k=1:length(bus)  if bus(k).id == 150      i=i+1;     can_bus(k,:)  end end 

you can raw text , conversion yourselves:

to text, have other output parameters xlsread. example:

[num,txt,raw] = xlsread('file.xls');

will return numeric values in num, text values in txt, , raw cell data in raw.

source


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -