Nonlinear Least Squares Curve Fitting