Dear Dr. Balda,
I've been trying to implement your code to a calibration problem I have with many variables. 9 fixed and one more for each measurement. I believe it is for this reason that your function has not been giving me consistent results and I end up iterating more than 1000 times. I already defined the funtions I want to minimize(the residuals) but I would like to add a restriction to some of the variables. The restriction would be something like I don't want to allow the absolut value of some of the x's to be greater than 30. How would you go about that?