I have a table of cells ( ex: 100*75 cell)
and i want to focus on column 12 , if any cell in it is NaN (empty) , i want to separate its row from the table.
i use this code:
[ndata text alldata] = xlsread('mdr1.xls','sheet1');[R1,C1]=size(alldata);j=1;K=1;for i=1:size(alldata,1) if isnan(alldata{i,12}) Ndate(j)=i; j=j+1; else Ydate(K)=i; K=K+1; endendNAdate=alldata(Ndate,:);DDate=alldata(Ydate,:);xlswrite('separate.xls',DDate,1);xlswrite('separate.xls',NADate,2);
it works…
but
I wonder if anyone has an idea to modify this code.
Best Answer