function [rrsfor,yfitforrd,residualforrd] = fitforrd(CfornoxErd,xlow,ylow,handle)
nox =1;
yfitforrd= 0.08 +(CfornoxErd(1)./[1+10.^(nox*(CfornoxErd(2)-xlow)/0.06)]);
residualforrd = ylow-yfitforrd;
rrsfor = sum(residualforrd.^2);
% ssefor = sum(errorfor.^2);

% ssrfor = sum((yfitfor-mean(yfitfor)).^2);
% sstfor = ssefor + ssrfor;
% r2 = ssrfor/sstfor;

set(gcf, 'DoubleBuffer','on');
set(handle,'ydata',yfitforrd)
drawnow
pause(.08)