# HG changeset patch # User Olaf Till # Date 1292513944 28800 # Node ID c767bb1afa03632932edc05379d585cc54f4669e # Parent 690181867e54551fe7ff06a1b76c35b68001a55c sqp.m: Fix indexing error in sqp bounds selection diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-12-16 Olaf Till + + * optimization/sqp.m: Fix indexing error in sqp bounds selection. + 2010-12-14 Doug Stewart * plot/bar.m: Improve the docstring. diff --git a/scripts/optimization/sqp.m b/scripts/optimization/sqp.m --- a/scripts/optimization/sqp.m +++ b/scripts/optimization/sqp.m @@ -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"))