Mercurial > hg > octave-nkf
annotate doc/interpreter/optim.txi @ 16791:acd6a21259a9
doc: Use the serial comma in Contributors chapter.
* doc/interpreter/contrib.txi: Use the serial comma.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 20 Jun 2013 19:14:55 -0700 |
parents | 72c96de7a403 |
children | f2a8592b8fbd |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
12224
diff
changeset
|
1 @c Copyright (C) 1996-2012 John W. Eaton |
7018 | 2 @c |
3 @c This file is part of Octave. | |
4 @c | |
5 @c Octave is free software; you can redistribute it and/or modify it | |
6 @c under the terms of the GNU General Public License as published by the | |
7 @c Free Software Foundation; either version 3 of the License, or (at | |
8 @c your option) any later version. | |
9 @c | |
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 @c for more details. | |
14 @c | |
15 @c You should have received a copy of the GNU General Public License | |
16 @c along with Octave; see the file COPYING. If not, see | |
17 @c <http://www.gnu.org/licenses/>. | |
3294 | 18 |
4167 | 19 @node Optimization |
3294 | 20 @chapter Optimization |
21 | |
6741 | 22 Octave comes with support for solving various kinds of optimization |
9068
5d3059e2a34c
Cleanup documentation for optim.texi, set.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
23 problems. Specifically Octave can solve problems in Linear Programming, |
6741 | 24 Quadratic Programming, Nonlinear Programming, and Linear Least Squares |
25 Minimization. | |
26 | |
3294 | 27 @menu |
4246 | 28 * Linear Programming:: |
3294 | 29 * Quadratic Programming:: |
30 * Nonlinear Programming:: | |
31 * Linear Least Squares:: | |
32 @end menu | |
33 | |
34 @c @cindex linear programming | |
35 @cindex quadratic programming | |
36 @cindex nonlinear programming | |
37 @cindex optimization | |
38 @cindex LP | |
39 @cindex QP | |
40 @cindex NLP | |
41 | |
4246 | 42 @node Linear Programming |
43 @section Linear Programming | |
44 | |
6741 | 45 Octave can solve Linear Programming problems using the @code{glpk} |
46 function. That is, Octave can solve | |
47 | |
48 @tex | |
49 $$ | |
50 \min_x c^T x | |
51 $$ | |
52 @end tex | |
53 @ifnottex | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
9642
diff
changeset
|
54 |
6741 | 55 @example |
56 min C'*x | |
57 @end example | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
9642
diff
changeset
|
58 |
6741 | 59 @end ifnottex |
60 subject to the linear constraints | |
61 @tex | |
62 $Ax = b$ where $x \geq 0$. | |
63 @end tex | |
64 @ifnottex | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
9642
diff
changeset
|
65 @math{A*x = b} where @math{x @geq{} 0}. |
6741 | 66 @end ifnottex |
67 | |
68 @noindent | |
69 The @code{glpk} function also supports variations of this problem. | |
70 | |
6502 | 71 @DOCSTRING(glpk) |
72 | |
4167 | 73 @node Quadratic Programming |
3294 | 74 @section Quadratic Programming |
75 | |
6741 | 76 Octave can also solve Quadratic Programming problems, this is |
77 @tex | |
78 $$ | |
79 \min_x {1 \over 2} x^T H x + x^T q | |
80 $$ | |
81 @end tex | |
82 @ifnottex | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
9642
diff
changeset
|
83 |
6741 | 84 @example |
85 min 0.5 x'*H*x + x'*q | |
86 @end example | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
9642
diff
changeset
|
87 |
6741 | 88 @end ifnottex |
89 subject to | |
90 @tex | |
91 $$ | |
92 Ax = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} \leq A_{ub} | |
93 $$ | |
94 @end tex | |
95 @ifnottex | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
9642
diff
changeset
|
96 |
6741 | 97 @example |
9068
5d3059e2a34c
Cleanup documentation for optim.texi, set.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
98 @group |
6741 | 99 A*x = b |
100 lb <= x <= ub | |
101 A_lb <= A_in*x <= A_ub | |
9068
5d3059e2a34c
Cleanup documentation for optim.texi, set.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
102 @end group |
6741 | 103 @end example |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
9642
diff
changeset
|
104 |
6741 | 105 @end ifnottex |
106 | |
6502 | 107 @DOCSTRING(qp) |
108 | |
9642
2ab5ace09d8b
doc/interpreter/optim.txi: document pqpnonneg
John W. Eaton <jwe@octave.org>
parents:
9209
diff
changeset
|
109 @DOCSTRING(pqpnonneg) |
2ab5ace09d8b
doc/interpreter/optim.txi: document pqpnonneg
John W. Eaton <jwe@octave.org>
parents:
9209
diff
changeset
|
110 |
4167 | 111 @node Nonlinear Programming |
3294 | 112 @section Nonlinear Programming |
113 | |
6741 | 114 Octave can also perform general nonlinear minimization using a |
115 successive quadratic programming solver. | |
116 | |
6502 | 117 @DOCSTRING(sqp) |
118 | |
4167 | 119 @node Linear Least Squares |
3294 | 120 @section Linear Least Squares |
121 | |
6741 | 122 Octave also supports linear least squares minimization. That is, |
6939 | 123 Octave can find the parameter @math{b} such that the model |
6741 | 124 @tex |
125 $y = xb$ | |
126 @end tex | |
127 @ifnottex | |
128 @math{y = x*b} | |
129 @end ifnottex | |
8828 | 130 fits data @math{(x,y)} as well as possible, assuming zero-mean |
6741 | 131 Gaussian noise. If the noise is assumed to be isotropic the problem |
132 can be solved using the @samp{\} or @samp{/} operators, or the @code{ols} | |
133 function. In the general case where the noise is assumed to be anisotropic | |
134 the @code{gls} is needed. | |
135 | |
136 @DOCSTRING(ols) | |
137 | |
3368 | 138 @DOCSTRING(gls) |
3294 | 139 |
7984
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7018
diff
changeset
|
140 @DOCSTRING(lsqnonneg) |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
141 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
142 @DOCSTRING(optimset) |
8817
03b7f618ab3d
include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents:
8286
diff
changeset
|
143 |
03b7f618ab3d
include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents:
8286
diff
changeset
|
144 @DOCSTRING(optimget) |