changeset 11371:c767bb1afa03

sqp.m: Fix indexing error in sqp bounds selection
author Olaf Till <olaf.till@uni-jena.de>
date Thu, 16 Dec 2010 07:39:04 -0800
parents 690181867e54
children 566249cf97fb
files scripts/ChangeLog scripts/optimization/sqp.m
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Wed Dec 15 03:18:44 2010 -0500
+++ b/scripts/ChangeLog	Thu Dec 16 07:39:04 2010 -0800
@@ -1,3 +1,7 @@
+2010-12-16  Olaf Till <olaf.till@uni-jena.de>
+
+	* optimization/sqp.m: Fix indexing error in sqp bounds selection. 
+
 2010-12-14  Doug Stewart <doug.dastew@gmail.com>
 
 	* plot/bar.m: Improve the docstring.
--- a/scripts/optimization/sqp.m	Wed Dec 15 03:18:44 2010 -0500
+++ b/scripts/optimization/sqp.m	Thu Dec 16 07:39:04 2010 -0800
@@ -312,7 +312,7 @@
       if (isvector (lb))
         __sqp_lb__ = tmp_lb = lb(:);
         lb_idx(:) = tmp_idx = (lb != -Inf);
-        __sqp_lb__ = __sqp_lb__(tmp_idx);
+        __sqp_lb__ = __sqp_lb__(tmp_idx, 1);
         lb_grad = lb_grad(lb_idx, :);
       elseif (isempty (lb))
         if (isa (x0, "single"))
@@ -328,7 +328,7 @@
       if (isvector (ub))
         __sqp_ub__ = tmp_ub = ub(:);
         ub_idx(:) = tmp_idx = (ub != Inf);
-        __sqp_ub__ = __sqp_ub__(tmp_idx);
+        __sqp_ub__ = __sqp_ub__(tmp_idx, 1);
         ub_grad = ub_grad(ub_idx, :);
       elseif (isempty (ub))
         if (isa (x0, "single"))