Mercurial > octave-antonio
annotate doc/interpreter/linalg.txi @ 7984:bbaa5d7d0143
Some documentation updates
author | David Bateman <dbateman@free.fr> |
---|---|
date | Mon, 28 Jul 2008 15:47:40 +0200 |
parents | 2df457529cfa |
children | fa78cb8d8a5c |
rev | line source |
---|---|
6778 | 1 @c Copyright (C) 1996, 1997, 2007 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 Linear Algebra |
3294 | 20 @chapter Linear Algebra |
21 | |
22 This chapter documents the linear algebra functions of Octave. | |
23 Reference material for many of these functions may be found in | |
24 Golub and Van Loan, @cite{Matrix Computations, 2nd Ed.}, Johns Hopkins, | |
25 1989, and in @cite{@sc{Lapack} Users' Guide}, SIAM, 1992. | |
26 | |
27 @menu | |
6531 | 28 * Techniques used for Linear Algebra:: |
3294 | 29 * Basic Matrix Functions:: |
30 * Matrix Factorizations:: | |
31 * Functions of a Matrix:: | |
32 @end menu | |
33 | |
6531 | 34 @node Techniques used for Linear Algebra |
35 @section Techniques used for Linear Algebra | |
36 | |
37 Octave includes a poly-morphic solver, that selects an appropriate | |
38 matrix factorization depending on the properties of the matrix itself. | |
39 Generally, the cost of determining the matrix type is small relative to | |
40 the cost of factorizing the matrix itself, but in any case the matrix | |
41 type is cached once it is calculated, so that it is not re-determined | |
42 each time it is used in a linear equation. | |
43 | |
44 The selection tree for how the linear equation is solve or a matrix | |
45 inverse is form is given by | |
46 | |
47 @enumerate 1 | |
48 @item If the matrix is upper or lower triangular sparse a forward or | |
6939 | 49 backward substitution using the @sc{Lapack} xTRTRS function, and goto 4. |
6531 | 50 |
51 @c Permuted triangular matrices currently disabled in the code | |
52 @c | |
53 @c @item If the matrix is a upper triangular matrix with column permutations | |
54 @c or lower triangular matrix with row permutations, perform a forward or | |
55 @c backward substitution, and goto 5. | |
56 | |
57 @item If the matrix is square, hermitian with a real positive diagonal, | |
58 attempt Cholesky factorization using the @sc{Lapack} xPOTRF function. | |
59 | |
60 @item If the Cholesky factorization failed or the matrix is not | |
61 hermitian with a real positive diagonal, and the matrix is square, factorize | |
62 using the @sc{Lapack} xGETRF function. | |
63 | |
64 @item If the matrix is not square, or any of the previous solvers flags | |
65 a singular or near singular matrix, find a least squares solution using | |
7072 | 66 the @sc{Lapack} xGELSD function. |
6531 | 67 @end enumerate |
68 | |
69 The user can force the type of the matrix with the @code{matrix_type} | |
70 function. This overcomes the cost of discovering the type of the matrix. | |
71 However, it should be noted incorrectly identifying the type of the matrix | |
72 will lead to unpredictable results, and so @code{matrix_type} should be | |
73 used with care. | |
74 | |
75 It should be noted that the test for whether a matrix is a candidate for | |
76 Cholesky factorization, performed above and by the @code{matrix_type} | |
77 function, does not give a certainty that the matrix is | |
78 Hermitian. However, the attempt to factorize the matrix will quickly | |
79 flag a non-Hermitian matrix. | |
80 | |
4167 | 81 @node Basic Matrix Functions |
3294 | 82 @section Basic Matrix Functions |
83 | |
3373 | 84 @DOCSTRING(balance) |
3294 | 85 |
3373 | 86 @DOCSTRING(cond) |
3294 | 87 |
3373 | 88 @DOCSTRING(det) |
3294 | 89 |
3428 | 90 @DOCSTRING(dmult) |
91 | |
92 @DOCSTRING(dot) | |
93 | |
3373 | 94 @DOCSTRING(eig) |
3294 | 95 |
3373 | 96 @DOCSTRING(givens) |
3294 | 97 |
7984
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7638
diff
changeset
|
98 @DOCSTRING(planerot) |
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7638
diff
changeset
|
99 |
3373 | 100 @DOCSTRING(inv) |
3294 | 101 |
6531 | 102 @DOCSTRING(matrix_type) |
103 | |
3373 | 104 @DOCSTRING(norm) |
3294 | 105 |
3373 | 106 @DOCSTRING(null) |
3294 | 107 |
3373 | 108 @DOCSTRING(orth) |
3294 | 109 |
3373 | 110 @DOCSTRING(pinv) |
3294 | 111 |
3373 | 112 @DOCSTRING(rank) |
3294 | 113 |
7984
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7638
diff
changeset
|
114 @DOCSTRING(rcond) |
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7638
diff
changeset
|
115 |
3373 | 116 @DOCSTRING(trace) |
3294 | 117 |
6502 | 118 @DOCSTRING(rref) |
119 | |
4167 | 120 @node Matrix Factorizations |
3294 | 121 @section Matrix Factorizations |
122 | |
3373 | 123 @DOCSTRING(chol) |
3294 | 124 |
6502 | 125 @DOCSTRING(cholinv) |
126 | |
127 @DOCSTRING(chol2inv) | |
128 | |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
129 @DOCSTRING(cholupdate) |
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
130 |
3373 | 131 @DOCSTRING(hess) |
3294 | 132 |
3373 | 133 @DOCSTRING(lu) |
3294 | 134 |
3373 | 135 @DOCSTRING(qr) |
3294 | 136 |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
137 @DOCSTRING(qrupdate) |
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
138 |
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
139 @DOCSTRING(qrinsert) |
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
140 |
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
141 @DOCSTRING(qrdelete) |
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7072
diff
changeset
|
142 |
3373 | 143 @DOCSTRING(qz) |
3372 | 144 |
3373 | 145 @DOCSTRING(qzhess) |
3294 | 146 |
3373 | 147 @DOCSTRING(schur) |
3294 | 148 |
7984
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7638
diff
changeset
|
149 @DOCSTRING(subspace) |
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7638
diff
changeset
|
150 |
3373 | 151 @DOCSTRING(svd) |
3294 | 152 |
5775 | 153 @c FIXME -- should there be a new section here? |
3428 | 154 |
155 @DOCSTRING(housh) | |
156 | |
157 @DOCSTRING(krylov) | |
158 | |
4167 | 159 @node Functions of a Matrix |
3294 | 160 @section Functions of a Matrix |
161 | |
3373 | 162 @DOCSTRING(expm) |
3294 | 163 |
3373 | 164 @DOCSTRING(logm) |
3294 | 165 |
3373 | 166 @DOCSTRING(sqrtm) |
3294 | 167 |
3373 | 168 @DOCSTRING(kron) |
3294 | 169 |
3373 | 170 @DOCSTRING(syl) |