Dear all,
I load an excel file into Matlab. For example:
[num,txt,raw]=xlsread('koi.xlsx'); data=num; % contains only numbers or empty cells
data=num2cell(data)size1=size(data);
If the first column in "data" is empty i use
data=[zeros(size1(1,1) ,1) num2cell(data)]
if not, I use the initial output
data=num2cell(data)
But is is a bit painful to check every file to see if the 1rst column is empty or not
So, What I am looking for is something like
[num,txt,raw]=xlsread('koi.xlsx'); data=num; %
data=num2cell(data) size1=size(data);
if data(:,1) is empty i fill it with an
data=[zeros(size1(1,1) ,1) num2cell(data)]
else
data=num2cell(data)
Best Answer