function writefile(filename,string)
%WRITEFILE - write a file from a string
%
%   useful to recovert an exp file from md.domainoutline
%
%   Usage:
%      writefile(filename,string)
%
%   Example:
%      writefile('DomainOutline.exp',md.domainoutline)

fid = fopen(filename,'wt');
fprintf(fid,string);
fclose(fid);
