help-octave
[Top][All Lists]
Advanced

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

Re: quadprog->qp newbie help


From: Martin Helm
Subject: Re: quadprog->qp newbie help
Date: Tue, 27 Mar 2012 18:39:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0

Am 27.03.2012 18:30, schrieb Martin Helm:
>
> Your problem is of course that the equality constraint Ax=b contains in
> your case one redundant constraint. When you remove it (for example by
> removing the last equation which is in reality just a linear combination
> of the first two constraints) it gives you of course the correct result.
>
> H = [1 -1; -1 2]; 
> f = [-2; -6];
> A = [1 1; -1 2];
> b = [2; 2];
> lb = zeros(2,1);
>
> qp([], H,f, A,b, lb,[])
>
> ans =
>
>    0.66667
>    1.33333
>
> I think this reduction can easily be built into qp as an automatic feature.
>
Ignore that, I was myself mislead with the translation from what is what
in quadprog. fork's answer is much more reasonable.


reply via email to

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