MATLAB: How to use fminunc providing gradient and hessian

fminconfminuncoptimization

Hi, could you help me in making this code (attached) working? Thanks!

Best Answer

You need to return the gradient and Hessian
function [val,g,H]=log_lik(theta,ix)
Also, these tolerances look unrealistically small
'TolX',10^-30,'TolFun',10^-30
Related Question