|
|
Re: No more fmincon messages!
Posted:
Feb 23, 2013 6:24 PM
|
|
"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);
|
|