I am working on two column text file and want to save the result of subtraction of two columns in a excel file in a single sheet. I worked on following code but the program below is writing the difference in separate sheet in a single workbook, and I need all 50 (difference) in a single sheet. Please help me. Thank you.
close all;
for k = 1:9
filename = sprintf('Data_F_Ind000%d.txt',k);
data = load (filename);
f = data(:,1) - data (:,2);
xlswrite('difference_1_9.xlsx',f,1);
end