COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### fmincon errors

• Email
• Follow

Im trying to use fmincon to minimise an objective function subject to 2 linear equality constraints. I get the following errors and I can interpret them. mu is a known vector, while the objective is being minimised subject to w.

Warning:    usage:  [bnds,rowd,sens,rowp,rowg] = mu(matin,blk,opt)
> In mu at 45
In objfun at 2
In fmincon at 540
??? Output argument "bnds" (and maybe others) not assigned during call to "G:\Mathworks Matlab
R2009b\toolbox\robust\rctobsolete\mutools\commands\mu.m>mu".

Error in ==> objfun at 2
f=(0.88*atan((mu*w-mu_p)/0.88))^2 - (2.25/3)*(0.88*atan((mu*w-mu_p)/0.88))^3 +
((2.25^2)/12)*(0.88*atan((mu*w-mu_p)/0.88))^4
Error in ==> fmincon at 540
initVals.f = feval(funfcn{3},X,varargin{:});

Caused by:
Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.

 0

See related articles to this posting


"Mohammad Sharik " <fe09me@mail.wbs.ac.uk> wrote in message
news:i5muql$2ab$1@fred.mathworks.com...
> Im trying to use fmincon to minimise an objective function subject to 2
> linear equality constraints. I get the following errors and I can
> interpret them. mu is a known vector, while the objective is being
> minimised subject to w.
>
> Warning:    usage:  [bnds,rowd,sens,rowp,rowg] = mu(matin,blk,opt)
>> In mu at 45
>  In objfun at 2
>  In fmincon at 540
> ??? Output argument "bnds" (and maybe others) not assigned during call to
> "G:\Mathworks Matlab
> R2009b\toolbox\robust\rctobsolete\mutools\commands\mu.m>mu".
>
> Error in ==> objfun at 2
> f=(0.88*atan((mu*w-mu_p)/0.88))^2 -
> (2.25/3)*(0.88*atan((mu*w-mu_p)/0.88))^3 +
> ((2.25^2)/12)*(0.88*atan((mu*w-mu_p)/0.88))^4

Do you pass a vector mu into your objective function?  If not, then your use
of mu in your objective function is being interpreted as a call to an
obsolete function in Robust Control Toolbox.  Use the techniques described
in this section of the documentation to pass the mu vector into your
objective function as an additional input.

http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-7.html

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
http://www.mathworks.com


 0
Reply slord (13686) 9/2/2010 3:50:07 AM

1 Replies
428 Views

Similar Articles

12/5/2013 12:36:50 PM
[PageSpeed]