changeset 24557:a3a263a26aab stable

doc: Fix TeX documentation for qp and clarify size of inputs (bug #52829). * optim.txi: Add missing variable 'x' to multiplication "A_in x" in TeX format. * qp.m: Add missing variable 'x' to multiplication "A_in x" in TeX format. Clarify size of the constraint inputs.
author Rik <rik@octave.org>
date Mon, 08 Jan 2018 11:31:22 -0800
parents 6e81c8a5add7
children 1c1adf6ab75d
files doc/interpreter/optim.txi scripts/optimization/qp.m
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/optim.txi	Sun Jan 07 21:40:02 2018 -0800
+++ b/doc/interpreter/optim.txi	Mon Jan 08 11:31:22 2018 -0800
@@ -89,7 +89,7 @@
 subject to
 @tex
 $$
- Ax = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} \leq A_{ub}
+ A x = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} x \leq A_{ub}
 $$
 @end tex
 @ifnottex
--- a/scripts/optimization/qp.m	Sun Jan 07 21:40:02 2018 -0800
+++ b/scripts/optimization/qp.m	Mon Jan 08 11:31:22 2018 -0800
@@ -45,7 +45,7 @@
 ## subject to
 ## @tex
 ## $$
-##  Ax = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} \leq A_{ub}
+##  A x = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} x \leq A_{ub}
 ## $$
 ## @end tex
 ## @ifnottex
@@ -62,9 +62,12 @@
 ## @noindent
 ## using a null-space active-set method.
 ##
-## Any bound (@var{A}, @var{b}, @var{lb}, @var{ub}, @var{A_lb}, @var{A_ub})
-## may be set to the empty matrix (@code{[]}) if not present.  If the initial
-## guess is feasible the algorithm is faster.
+## Any bound (@var{A}, @var{b}, @var{lb}, @var{ub}, @var{A_in}, @var{A_lb},
+## @var{A_ub}) may be set to the empty matrix (@code{[]}) if not present.  The
+## constraints @var{A} and @var{A_in} are matrices with each row representing
+## a single constraint.  The other bounds are scalars or vectors depending on
+## the number of constraints.  The algorithm is faster if the initial guess is
+## feasible.
 ##
 ## @table @var
 ## @item options