question about derivatives in lsqnonlin

1 view (last 30 days)
Amy
Amy on 6 Feb 2012
Hi All,
I use lsqnonlin to estimate parameters in my model, which is the weighted least squares estimator for a joint real normal distribution. In my script, I give a user-defined derivatives and set the 'DerivativeCheck' as 'on' in the options settings. However, without changing anything else (same function, same input, same starting values...), the maximum relative difference shown displays differently as I run the function repeatly. Also, the element that gives the maximum relative difference is changing. Has anyone face the same problem? or know how to solve this? I really want to find out what is the problem with my user-defined derivatives.
Thanks in advance, Amy

Answers (0)

Community Treasure Hunt

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

Start Hunting!