Mercurial > hg > octave-lyh
comparison scripts/linear-algebra/qzhess.m @ 3372:f16c2ce14886
[project @ 1999-11-23 19:07:09 by jwe]
author | jwe |
---|---|
date | Tue, 23 Nov 1999 19:07:18 +0000 |
parents | 8b262e771614 |
children | f8dde1807dee |
comparison
equal
deleted
inserted
replaced
3371:86873384cd10 | 3372:f16c2ce14886 |
---|---|
15 ## You should have received a copy of the GNU General Public License | 15 ## You should have received a copy of the GNU General Public License |
16 ## along with Octave; see the file COPYING. If not, write to the Free | 16 ## along with Octave; see the file COPYING. If not, write to the Free |
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA | 17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
18 ## 02111-1307, USA. | 18 ## 02111-1307, USA. |
19 | 19 |
20 ## Usage: [aa, bb, q, z] = qzhess (a, b) | 20 ## -*- texinfo -*- |
21 ## | 21 ## @deftypefn {Function File} {[@var{aa}, @var{bb}, @var{q}, @var{z}] =} qzhess (@var{a}, @var{b}) |
22 ## Compute the qz decomposition of the matrix pencil (a - lambda b) | 22 ## Compute the Hessenberg-triangular decomposition of the matrix pencil |
23 ## | 23 ## @code{(@var{a}, @var{b})}, returning |
24 ## result: (for Matlab compatibility): | 24 ## @code{@var{aa} = @var{q} * @var{a} * @var{z}}, |
25 ## | 25 ## @code{@var{bb} = @var{q} * @var{b} * @var{z}}, with @var{q} and @var{z} |
26 ## aa = q*a*z and bb = q*b*z, with q, z orthogonal, and | 26 ## orthogonal. For example, |
27 ## v = matrix of generalized eigenvectors. | 27 ## |
28 ## | 28 ## @example |
29 ## This ought to be done in a compiled program | 29 ## @group |
30 ## | 30 ## [aa, bb, q, z] = qzhess ([1, 2; 3, 4], [5, 6; 7, 8]) |
31 ## Algorithm taken from Golub and Van Loan, Matrix Computations, 2nd ed. | 31 ## @result{} aa = [ -3.02244, -4.41741; 0.92998, 0.69749 ] |
32 ## @result{} bb = [ -8.60233, -9.99730; 0.00000, -0.23250 ] | |
33 ## @result{} q = [ -0.58124, -0.81373; -0.81373, 0.58124 ] | |
34 ## @result{} z = [ 1, 0; 0, 1 ] | |
35 ## @end group | |
36 ## @end example | |
37 ## | |
38 ## The Hessenberg-triangular decomposition is the first step in | |
39 ## Moler and Stewart's QZ decomposition algorithm. | |
40 ## | |
41 ## Algorithm taken from Golub and Van Loan, @cite{Matrix Computations, 2nd | |
42 ## edition}. | |
43 ## @end deftypefn | |
32 | 44 |
33 ## Author: A. S. Hodel <scotte@eng.auburn.edu> | 45 ## Author: A. S. Hodel <scotte@eng.auburn.edu> |
34 ## Created: August 1993 | 46 ## Created: August 1993 |
35 ## Adapted-By: jwe | 47 ## Adapted-By: jwe |
36 | 48 |