Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

 Search Thread: Advanced Search

 Messages: [ Previous | Next ]
 Vsh Posts: 14 Registered: 12/8/12
Re: Minimization using Fmincon Error
Posted: Aug 5, 2013 4:29 PM
 Plain Text 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

Date Subject Author
8/5/13 Vsh
8/5/13 Alan Weiss
8/5/13 Vsh

© The Math Forum at NCTM 1994-2018. All Rights Reserved.