}
double[] params = { mean, stddevq, 1 };
boolean[] dofit = { true, true, false };
LevenbergMarquardtMethod fit = new LevenbergMarquardtMethod(new GaussianFittingFunction(), params, dofit, testx, testy, s);
for(int i = 0; i < 50; i++) {
fit.iterate();
}
double[] ps = fit.getParams();
// compare results.
double[] should = { 0.152986763079, 1.00115077, 1 };
assertEquals("Mean doesn't match.", should[0], ps[0], 0.0001);