Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Objective function or lagrangian gradient input to fmincon?
Posted:
Jan 21, 2013 10:58 AM
|
|
On 1/21/2013 2:17 AM, Bruno Luong wrote: > "George Shoukry" wrote in message > <kdi3jg$bte$1@newscl01ah.mathworks.com>... >> So, the gradient doesn't need to be of the lagrangian; just the >> objective function? >> > > Simple and logical: > > The gradient implemented of the objective function for must be the > objective function alone. The gradient implemented of the constraint > function for must be the constraint function alone. > Bruno
To add to what Bruno said, you could check the documentation for objectives and constraints: http://www.mathworks.com/help/optim/ug/writing-objective-functions.html#bsj1e55 http://www.mathworks.com/help/optim/ug/writing-constraints.html#brhkghv-16
Alan Weiss MATLAB mathematical toolbox documentation
|
|
|
|