Using of the iterator index in lsqnonlin

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

 Accepted 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

1 Comment

Thank you so much Alan Weiss,
I could solve the problem easily by the other way :D
thanks again

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!