fitting parameter X and fval at each function evaluation during lsqnonlin iterations

3 views (last 30 days)
Hello I am using lsqnonlin in order to carry out data fitting/curve fitting. Using the 'iter' display options i see that it takes n number of iterations to reach the final solution and I can also see the fval at each of this iteration. However during each iteration my function is evaluated twice. I would like to see or store the value of the parameter x and fval at each of these function evaluations. How can I do this? Thank you in advance.

Answers (0)

Community Treasure Hunt

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

Start Hunting!