function WriteFitParameters(handles)
% FUnction to update my default preference files

fid=fopen('FitParameters.jfit','w');
fprintf(fid,'%s\n','Default directory to use:');
fprintf(fid,'%s\n',handles.workdir);
fprintf(fid,'%s\n','Maximum value of n which will be considered: ( Increase this if you think higher n are likely. )');
fprintf(fid,'%d\n',handles.fitspecs.maxn);
fprintf(fid,'%s\n','Number of different starting points to use in seeking the global maximum: (Increase this to make the fitting more reliable)');
fprintf(fid,'%e\n',handles.fitspecs.nstartingpoints);
fprintf(fid,'%s\n','Number of function evaluations after which the program will give up fitting: (Increase this if the fitting keeps failing)');
fprintf(fid,'%e\n',handles.fitspecs.maxnevals);
fprintf(fid,'%s\n','Number of runs used in Monte Carlo simulations: (Increase this to get more accurate distributions of measures such as chi-squared. Enter 0 if you don''t want any adequacy testing)');
fprintf(fid,'%e\n',handles.fitspecs.nsim);
fprintf(fid,'%s\n','Number of bins to use in drawing histograms of experimental data (only affects appearance, not any results)');
fprintf(fid,'%e\n',handles.fitspecs.numbins);
fprintf(fid,'%s\n','Linewidth to use in drawing model fits (PDF & CDF) 1 = thin, 2 = medium, 4 = thick');
fprintf(fid,'%e\n',handles.fitspecs.lw);
fprintf(fid,'%s\n','Fontsize to use in graphs (8 = very small, 10 = medium/small, 14 = big)');
fprintf(fid,'%e\n',handles.fitspecs.fs);

fclose(fid);