From: Alan_Weiss <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Objective function or lagrangian gradient input to fmincon?
Date: Mon, 21 Jan 2013 10:58:47 -0500
Organization: MathWorks
Lines: 21
Message-ID: <kdjojn$91c$>
References: <kdi3jg$bte$> <kdiq1k$ni2$>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: 1358783927 9260 (21 Jan 2013 15:58:47 GMT)
NNTP-Posting-Date: Mon, 21 Jan 2013 15:58:47 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
In-Reply-To: <kdiq1k$ni2$>
Xref: comp.soft-sys.matlab:787004

On 1/21/2013 2:17 AM, Bruno Luong wrote:
> "George Shoukry" wrote in message 
> <kdi3jg$bte$>...
>> 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:

Alan Weiss
MATLAB mathematical toolbox documentation