diff scripts/optimization/qp.m @ 6523:589c8dbba916

[project @ 2007-04-12 19:06:44 by jwe]
author jwe
date Thu, 12 Apr 2007 19:06:44 +0000
parents e25f55e1b226
children 2a715c6409a5
line wrap: on
line diff
--- a/scripts/optimization/qp.m	Thu Apr 12 15:42:02 2007 +0000
+++ b/scripts/optimization/qp.m	Thu Apr 12 19:06:44 2007 +0000
@@ -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);