filename = ['Advection1D_ComputationInfo_for_K=',num2str(K),',_N=',num2str(N),'.txt'];
fileID = fopen(filename,'a'); % to add text to existing file

fprintf(fileID,'\n\n');
fprintf(fileID,'Computed error norms:\n');
fprintf(fileID,'L^1: %e\n',globalL1error);
fprintf(fileID,'L^infty: %e',globalLinftyerror);

fclose(fileID);