Now, I have this problem. I need to estimate the covariance matrix of the minimum of a chi^2 fitting. I'm using fminunc to minimize the objective function. I have only 4 parameters, so a pretty easy task. (of course I've set "LargeScale" to off). The minimization works perfectly.
Since I need the covariance matrix I was thinking about inverting the hessian given as an output by fminunc. While googling I've found some guys saying that is not necessarily good to do so because the estimate might have some bias/problem/unpreciseness that might give a very bad covariance matrix estimate. I didn't understand it very much, also because I'm not too much into optimization. Can somebody expert tell me if it's good enough for what I have to do or, in case, which are the hypothesis under which it's not good anymore?