|
Hello,
It is not clear from the help files whether the gradient that fmincon accepts should be the gradient of the objective function or of the lagrangian.
This page (fmincon help):
http://www.mathworks.com/help/optim/ug/fmincon.html#f186882
makes it clear in the "Hessian" section that the hessian fmincon accepts is the hessian of the lagrangian.
But the description of the inputs seems to imply that the gradient supplied is of just the objective function, not the lagrangian: "[x,fval,exitflag,output,lambda,grad] = fmincon(...) returns the value of the gradient of fun at the solution x."
So, the gradient doesn't need to be of the lagrangian; just the objective function?
Thanks!
|