arrays - Matlab : Reading strings and numbers to workspace -
so excel file test.xlsx
have 1.44e+12 33 nochange 1.44e+12 4 1.44e+12 466 nochange 1.44e+12 have 1.44e+12 467 nochange 1.44e+12 4 1.44e+12 100 nochange 1.44e+12 minutes 1.44e+12 666 nochange 1.44e+12 i used eyet = xlsread(test.xlsx) , im getting numbers right, nan string values.
there other function read it? textscan maybe?
use 3 outputs of xlsread. here's example:
excel file:
have 1 aa 5 4 2 bb 6 have 3 bb 67 matlab code:
>> [num, txt, raw] = xlsread('test.xls') num = 1 nan 5 2 nan 6 3 nan 67 txt = 'have' '' 'aa' 'four' '' 'bb' 'have' '' 'bb' raw = 'have' [ 1] 'aa' [ 5] 'four' [ 2] 'bb' [ 6] 'have' [ 3] 'bb' [ 67] [ nan] [nan] [nan] [nan] as can see, num matrix containing numbers, , nan strings; txt cell array of strings, '' numbers; , raw cell array containing numbers , strings.
Comments
Post a Comment