MATLAB: Using of the iterator index in lsqnonlin

index of iteratorlsqnonlinoptimization

Hi,
I am using LSQNONLIN in my optimization problem and passing an initial set of parameters to LSQNONLIN in a file called objfun.m and this set of parameters are being optimized. Now, I would like to use the index of iterator in the objfun.m function. Would you please let me know how I can do it?
Any help is appreciated.
Thanks, Mehr

Best Answer

The short answer is that you should not do this. Your objective function should not depend on the iteration number.
What is it that you are really trying to do? Maybe we can help you with that.
Alan Weiss
MATLAB mathematical toolbox documentation
Related Question