Hi,

I am having trouble implementing the most basic NLLS algorithm. I am following the example from here to every detail, yet my implementation keeps on diverging after 5 or so iterations. I will give an outline of what I'm doing below.

The example tries to fit the data to a Gaussian function, so the paramters for my model are .

Step 1

Make an initial guess of the paramters

Step 2

Compute the values of the Jacobian using the current paramter values for each data point

Step 3

Compute the value of the current model approximation

Error between the data set and the current model

If the error is large, update the paramter values as follows

Loop back toStep 2.

If my pseudo-code has confused things, please ignore it and just describe how such a basic NLLS algorithmshouldbe implemented.

Thanks!