Mercurial > hg > octave-lojdl
changeset 6523:589c8dbba916
[project @ 2007-04-12 19:06:44 by jwe]
author | jwe |
---|---|
date | Thu, 12 Apr 2007 19:06:44 +0000 |
parents | 475c83367a0e |
children | 03c89ade4070 |
files | scripts/ChangeLog scripts/optimization/qp.m |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2007-04-12 John W. Eaton <jwe@octave.org> + + * optimization/qp.m: Avoid Octave indexing bug. + 2007-04-12 Carlo de Falco <kingcrimson@tiscali.it> * miscellaneous/menu.m, control/base/bddemo.m,
--- a/scripts/optimization/qp.m +++ b/scripts/optimization/qp.m @@ -176,8 +176,14 @@ ## Discard inequality constraints that have -Inf bounds since those ## will never be active. idx = isinf (bin) & bin < 0; - bin(idx) = []; - Ain(idx,:) = []; + + ## FIXME -- this check should not be necessary, but Octave is + ## incorrectly returning [](0x0) for bin(idx) when bin = [](0x1) and + ## idx = [](0x1). + if (! isempty (idx)) + bin(idx) = []; + Ain(idx,:) = []; + endif n_in = length (bin);