From Excel to Matlab
From Excel to Matlab
(OP)
I have a two dimensional array in excel such that each cell has a different number of elements separated by commas. For example
Cell A1 has 1.5,201,202,400
Cell B1 has 1.5,202,3000,400,170,190,5.6
Is there an effecient way or command which will bring this data into matlab in the form of cell arrays consisting of either numbers of strings.
I tried using [A,data4] = xlsread('filename') but that does seem to work for two dimensional array in this situation.
Please let me know if this question is 'clear as mud' and I will try to re-explain. Thanks
Cell A1 has 1.5,201,202,400
Cell B1 has 1.5,202,3000,400,170,190,5.6
Is there an effecient way or command which will bring this data into matlab in the form of cell arrays consisting of either numbers of strings.
I tried using [A,data4] = xlsread('filename') but that does seem to work for two dimensional array in this situation.
Please let me know if this question is 'clear as mud' and I will try to re-explain. Thanks





RE: From Excel to Matlab
To get numbers from this, use str2num(data4{1}) and str2num(data4{2})
Those are curley braces around the 1 and 2.