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$>
References: <> <hnltt1$q55$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1268677985 7254 (15 Mar 2010 18:33:05 GMT)
NNTP-Posting-Date: Mon, 15 Mar 2010 18:33:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: comp.soft-sys.matlab:616993

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hnltt1$q55$>...
> free0iran <> wrote in message <>...
> > 
> > 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.