question about derivatives in lsqnonlin

Amy asked 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

0 comments

Products

    0 answers

    Contact us at files@mathworks.com