From: Jason Park on
I am currently using LSQNONLIN to minimize my objective function, since I heard FMINCON is somewhat slower than this for nonlinear least squares minimisation, not to mention PATTERNSEARCH or FMINSEARCH which usually take longer due to their non-gradient-based algorithm.

There are some options to specify, MaxFunEvals and MaxIter and I've limited them to 100 each. Since my function embeds a loop in it and every calculation is conducted within each, I've set a stopwatch for each number of the loop executed, which not only tells me the time but also the number of loop execution. At the moment, the number has gone as far as 261.

To my understanding, for the limited number of iterations pre-specified, I thought it shouldn't exceed 100; either terminated as it hits 100 times or converge before it. Yet, how come is it possible that it is running 261 right at the moment I am writing this with no termination?

Please correct me if my understanding on MaxFunEvals and MaxIter is wrong, which is the most probable case since it is anyway running, but I don't know what I need to do with lack of knowledge on this. For each loop-execution, it takes about 630 sec (10.5 min), and what I want to see is if that anyhow runs properly yielding estimates of some reasonable range. Then the matter can narrow down to the number of iterations/whatever that is until convergence, which I hope to be done by a high-performance computer at my university.

Please help me somebody, and it will be much appreciated.

Jason