help-octave
[Top][All Lists]
Advanced

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

Re: Quadratic Programming


From: John W. Eaton
Subject: Re: Quadratic Programming
Date: Fri, 17 Jul 2009 12:50:32 -0400

On 16-Jul-2009, Jonathan Stickel wrote:

| > It also works if you do this:
| > 
| >   Alb = zeros(0,1);
| >   Ain = zeros(0,2);
| >   Aub = zeros(0,1);
| > 
| > That seems reasonable to me, since with these definitions, the
| > dimensions of
| > 
| >   Alb <= Ain*x <= Aub
| > 
| > make sense.
| > 
| > With Alb = Ain = Aub = [], the dimensions don't make sense.  So I
| > don't see that any change is needed.
| > 
| > jwe
| 
| It seems strange to me that A can be provided as empty, as can A_lb and
| A_ub, but Ain cannot be.   In any case, the help text of qp could be
| improved to explain what are proper inputs.

I assume that is allowed because someone thought that there was a need
for writing

  qp (x, H, q, [], [], [], [], A_lb, A_in, A_ub)

and using [] to mean "missing".  In that case, I suppose it makes some
sense to allow A_lb, A_in, and A_ub to be [].  But I think it would be
best for them to be skipped only if they are actually [], not just
some randomly sized empty matrices. But since these are the last
elements of the argument list, they can also be omitted.  I don't see
this change as really important, but I'd certainly consider a patch.

To distinguish between [] and other zero-sized matrices, use isnull,
not isempty.  Maybe the same should also be done for the other
optional arguments.

jwe


reply via email to

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