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: No more fmincon messages!
Replies: 2   Last Post: Feb 23, 2013 6:24 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
matt dash

Posts: 568
Registered: 4/18/08
Re: No more fmincon messages!
Posted: Feb 23, 2013 6:24 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Manalap" wrote in message <kgbe73$s7h$1@newscl01ah.mathworks.com>...
> Perhaps I don't know how to put options.
>
> options = optimset('Display','off');
> [x,fvalx]=fmincon(func,[0.7],[],[],[],[],[0.5],[1],options);
>
>
> This created error.
> =====================
>
> Error using optimfcnchk (line 286)
> NONLCON must be a function.
>
> Error in fmincon2 (line 440)
> confcn =
> optimfcnchk(NONLCON,'fmincon',length(varargin),funValCheck,flags.gradconst,false,true);
>
> Error in display2 (line 58)
> [x,fvalx]=fmincon2(II,[0.7],[],[],[],[],[0.5],[1],options);

> >>

You just have the wrong number of inputs to fmincon. This is all you need:

options = optimset('Display','off','Algorithm','active-set');
[x,fvalx]=fmincon(func,[0.7],[],[],[],[],[0.5],[1],[],options);



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

[Privacy Policy] [Terms of Use]

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