I import an excel file into Matlab. Then I expect with the code I write in Matlab, it will export the result in column 3 in the original excel. But nothing appears in column 3 of the file sample2.xlsx. Could you help me?
clear allclcA=xlsread('Criteria.xlsx');B=xlsread('sample2.xlsx');n=0;x=0;for h=1:99 if B(h,2)>50 n=n+1; x= x+B(h,3); endendx=x/n;for h=1:99 if B(h,2)>50 B(h,4)=x; endendxlswrite('sample2.xlsx',B)
Best Answer