MATLAB: How to make FMINUNC work faster

fminuncoptimization

Hello, I there anyway to make FMINUNC program to run faster than normal. I am using the following command.
c(:,i) = fminunc(@(c) (chi1(c, K0_com)), cint, options);
chi1 is the function that it accepts from a function file. Thanks.

Best Answer

Lots of potential ways, but only broad recommendations are possible given the minmal info provided about your problem. You could use the 'UseParallel' option in conjunction with the Parallel Computing Toolbox, if you have it. You could also do your own calculation of the gradient and Hessian with the 'GradObj' and, if applicable, the 'Hessian' options. Not only can this speed convergence, but often you can recycle intermediate quantities from your objective function calculation to make the derivative calculations more efficient than what the default finite differencing methods do.