Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: fmincon minimisation
Date: Mon, 15 Mar 2010 18:33:05 +0000 (UTC)
Organization: Xoran Technologies
Lines: 16
Message-ID: <hnluh1$72m$1@fred.mathworks.com>
References: <c0e3ccdb-631d-4490-8436-90e5eec0c9f2@z4g2000yqa.googlegroups.com> <hnltt1$q55$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1268677985 7254 172.30.248.35 (15 Mar 2010 18:33:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 15 Mar 2010 18:33:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:616993

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hnltt1$q55$1@fred.mathworks.com>...
> free0iran <free_iran@hotmail.co.uk> wrote in message <c0e3ccdb-631d-4490-8436-90e5eec0c9f2@z4g2000yqa.googlegroups.com>...
> 
> > 
> > Optimization terminated: no feasible solution found. Magnitude of
> > search
> >  direction less than 2*options.TolX but constraints are not satisfied.
> > 
> > i tried to change the x tolerance but that did no good.
> ====================
> 
> It's not clear why  this is a problem? fmincon is  just telling you that it's finished.

Sorry, I overlooked the part about "no feasible solution found"

What you should do is comparethe output of your analytical constraint gradient function to a numerical approximation of the constraint gradient. Numerical approximation works, as you've mentioned, when MATLAB performs it. So the likelihood is that you have a mistake in the analytical gradient calculation.