Mercurial > hg > octave-terminal
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 +++ b/scripts/ChangeLog @@ -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 +++ 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"))