This code i currently have it creating one excel file per data file
what may i modify to have it save on the same excel file one batch after the other
for file_counter = 1:number_of_files(1)
load(mat_files(file_counter).name)
sn = strsplit(mat_files(file_counter).name,'_');
lgn(file_counter) = sn(3);
title =[data_location lgn{file_counter} '_raw_data.xlsx'];
S21_dB = sparams.post_process_S21_dB(:,1:16);
S41_dB = sparams.post_process_S41_dB(:,1:16);
Nfig = NFig.post_process_noise_figure_dB;
writematrix(S21_dB,title)
writematrix(S41_dB,title, 'Sheet',2)
writematrix(Nfig,title, 'Sheet',3)