I am currently using fminsearch to minimize a non-continuous function, with x = vector of 7 variables. It works well but has two problems (for me): 1) it is slow, 2) more importantly it doesn't return any uncertainties / errors for the variables in x. Is there a minimiser function that would do the trick and return uncertainties / errors for x?
Found solution myself.
[x, fval] = fminsearch (fun, x0, options);
[hess,err] = hessian(fun,x);
uncert = sqrt(diag(inv(hess)));
The hessian suite is available from: Adaptive Robust Numerical Differentiation Thanks to John D'Errico the author of the suite. This is time expensive (it is slow) but works very well.