
function diff = fit_simp_alkili(x,X,Y)
% This function is called by LSQNONLIN.
% x is a vector which contains the coefficients of the
% equation. X and Y are the option data sets that were
% passed to lsqnonlin.
 
A=x(1);
B=x(2);
C=x(3);
diff = A+ C.*exp(-1.0*(B./X)).*((B./X).^5+5*(B./X).^4+20*(B./X).^3+60*(B./X).^2+120*(B./X)+120)- Y;
end

