Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Minimization using Fmincon Error
Replies: 2   Last Post: Aug 5, 2013 4:29 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Vsh

Posts: 13
Registered: 12/8/12
Re: Minimization using Fmincon Error
Posted: Aug 5, 2013 4:29 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks Alan for the advice. I'll give it a try.


Alan_Weiss <aweiss@mathworks.com> wrote in message <ktov5i$6ng$1@newscl01ah.mathworks.com>...
> On 8/5/2013 2:02 PM, Vsh wrote:
> > Hello everyone,
> > I'm working on a minimization problem with the objective of minimizing
> > the difference between the measured properties and my model's input
> > parameters (5 variables). I'm using fmincon: thus I have an objective
> > function (i.e. my mechanistic model), initial guesses for my
> > variables, no linear equality/inequality (i.e. [],[],[],[]), lower
> > bound, upper bound for all variables and a constraint function (i.e.
> > nlconst) to ensure positive, definitness of my variables.
> >
> > Of course my code is not working but I quiet don't get where it fails,
> > I was hoping you guys could help me understand what these error
> > messages mean:
> > Error using optimfcnchk/checkfun (line 318)
> > User function 'homogenizationRoutine1t' returned NaN
> > when evaluated;
> > FMINCON cannot continue.
> >
> > Error in nlconst (line 744)
> > f = feval(funfcn{3},x,varargin{:});
> >
> > Error in fmincon (line 837)
> > [X,FVAL,LAMBDA,EXITFLAG,OUTPUT,GRAD,HESSIAN]=...
> >
> > Does this mean that my constraints (defined by me) cannot be met using
> > the defined objective function (also defined by me)?

>
> The error means that your nonlinear constraint function returned a NaN
> value.
>
> It appears that you are using the fmincon active-set algorithm. I
> suggest that you try the interior-point algorithm, which can be robust
> to this kind of error (as long as it does not occur at the initial point
> or during the calculation of the gradient at the initial point).
>
> Alan Weiss
> MATLAB mathematical toolbox documentation




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.