home *** CD-ROM | disk | FTP | other *** search
- function [x,lambda] = qpnegdef(H,f,A,B,vlb,vub,X,neqcstr,verbosity,negdef)
- %QPNEGDEF QP solution when Hessian in not positive definite
- % (i.e the Hessian has any zero or negative eigenvalues).
- %
- % Has the same syntax as QP, i.e: X=QP(H,f,A,b,VLB,VUB,X0).
- % Uses CONSTR.
-
- % Copyright (c) 1993 by the MathWorks, Inc.
- % Andy Grace 22-Jan-92.
-
-
- % Handle missing arguments
- if nargin<9, verbosity = [];
- if nargin<8, neqcstr=0;
- if nargin < 7, X=[];
- if nargin<6, vub=[];
- if nargin<5, vlb=[];
- end, end, end, end, end
- options(1) = 1; % Display intermediate results
- options(13) = neqcstr;
- [x,options,lambda] = constr('costqp',X,options,vlb,vub,'costqpg',H,f,A,B);
-
- % To solve your problem use:
- %x=qp2(hess,em1,qpcon,qprhs,vlb,vub,d0,neq,0,1)
-