%---------------------------------------------------------
% fwrite2col
%---------------------------------------------------------
% write a two column datafile
%
% input:	outfile	string	filename to write
% 		x		real(n)	1st column
% 		y		real(n)	2nd column
% 		n		int		number of datapoints
%
% usage:	fwrite2col(outfile)
%
%---------------------------------------------------------
% N.Teanby      27/9/2013	Original version
%---------------------------------------------------------
function [] = fwrite2col(outfile,x,y,n)

file_id     = fopen(outfile,'w');
for i=1:n
  fprintf(file_id,'%16.6e %16.6e\n',x(i),y(i));
end
fclose(file_id);

