help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

quadprog->qp newbie help


From: MarkSheedy
Subject: quadprog->qp newbie help
Date: Tue, 27 Mar 2012 05:29:17 -0700 (PDT)

Hello,

I am converting some code that uses the MatLab quadprog function to the
Octave qp function.
To familiarise myself with the code (I am a MatLab & Octave newbie), I have
tried the example given in the MatLab docs.

http://www.mathworks.co.uk/help/toolbox/optim/ug/quadprog.html

H = [1 -1; -1 2]; 
f = [-2; -6];
A = [1 1; -1 2; 2 1];
b = [2; 2; 3];
lb = zeros(2,1);

ML: quadprog(H,f,A,b,[],[],lb,[],[],'Algorithm','active-set')
Oct: = qp([], H,f, A,b, lb,[])

Using MatLab, this exits with a global minimum  ( x = [ 0.6667;1.3333 ] )
Using Octave, this fails with the following
"qp: equality constraint matrix must be full row rank"

If I alter qp.m to remove this error, the function terminates, but with a
local minimum that does not satisfy one of the constraints (x
=[0.77143;1.37143 ] )

Any help would be much appreciated.

M.






--
View this message in context: 
http://octave.1599824.n4.nabble.com/quadprog-qp-newbie-help-tp4508688p4508688.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]