[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

20.2 行列の分解

Loadable Function: chol (a)

正定値である対称行列aを,以下のようにCholesky分解する。

Loadable Function: h = hess (a)
Loadable Function: [p, h] = hess (a)

行列aのHessenberg分解を行う。

通常,Hessenberg分解は固有値計算の最初のステップとして使用される。 しかし,他にも充分に応用できる(詳しくはGolub, Nash, and Van Loan, IEEE Transactions on Automatic Control, 1979を参照せよ)。 Hessenberg分解は,以下のような分解である。

Loadable Function: [l, u, p] = lu (a)

LAPACKからのサブルーチンを用いてaのLU分解を計算する。 その結果は,オプション戻り値pによるpermuted形式で返される。 たとえば,行列a = [1, 2; 3, 4]を与えると,以下のようになる。

 
[l, u, p] = lu (a)

returns

 
l =

  1.00000  0.00000
  0.33333  1.00000

u =

  3.00000  4.00000
  0.00000  0.66667

p =

  0  1
  1  0

この行列は正方行列である必要はない。

Loadable Function: [q, r, p] = qr (a)

LAPACKからのサブルーチンを用いてaのQR分解を計算する。 その結果は,オプション戻り値pによるpermuted形式で返される。 たとえば,行列a = [1, 2; 3, 4]を与えると,以下のようになる。

 
[q, r] = qr (a)

returns

 
q =

  -0.31623  -0.94868
  -0.94868   0.31623

r =

  -3.16228  -4.42719
   0.00000  -0.63246

qr分解は,過剰決定方程式系に対する最小二乗問題の 解法の応用である。 (過剰決定方程式系とはすなわち, がtall,thin行列である。)QR分解は,

permuted QR分解[q, r, p] = qr (a)は, rの対角要素がその大きさにおいて減少するようなQR分解を形成する。 たとえば,行列a = [1, 2; 3, 4]を与えると,以下のようになる。

 
[q, r, p] = qr(a)

returns

 
q = 

  -0.44721  -0.89443
  -0.89443   0.44721

r =

  -4.47214  -3.13050
   0.00000   0.44721

p =

   0  1
   1  0

permuted qr分解([q, r, p] = qr (a))は, span (a)の直交基底を構築する。

Loadable Function: lambda = qz (a, b)

Generalized eigenvalue problem A x = s B x, QZ decomposition. There are three ways to call this function:

  1. lambda = qz(A,B)

    Computes the generalized eigenvalues of (A - s B).

  2. [AA, BB, Q, Z, V, W, lambda] = qz (A, B)

    Computes qz decomposition, generalized eigenvectors, and generalized eigenvalues of (A - sB) with Q and Z orthogonal (unitary)= I

  3. [AA,BB,Z{, lambda}] = qz(A,B,opt)

    As in form [2], but allows ordering of generalized eigenpairs for (e.g.) solution of discrete time algebraic Riccati equations. Form 3 is not available for complex matrices, and does not compute the generalized eigenvectors V, W, nor the orthogonal matrix Q.

    opt

    for ordering eigenvalues of the GEP pencil. The leading block of the revised pencil contains all eigenvalues that satisfy:

    "N"

    = unordered (default)

    "S"

    = small: leading block has all |lambda| <=1

    "B"

    = big: leading block has all |lambda >= 1

    "-"

    = negative real part: leading block has all eigenvalues in the open left half-plant

    "+"

    = nonnegative real part: leading block has all eigenvalues in the closed right half-plane

Note: qz performs permutation balancing, but not scaling (see balance). Order of output arguments was selected for compatibility with MATLAB

See also: balance, dare, eig, schur

Function File: [aa, bb, q, z] = qzhess (a, b)

Compute the Hessenberg-triangular decomposition of the matrix pencil (a, b), returning aa = q * a * z, bb = q * b * z, with q and z orthogonal. For example,

 
[aa, bb, q, z] = qzhess ([1, 2; 3, 4], [5, 6; 7, 8])
⇒ aa = [ -3.02244, -4.41741;  0.92998,  0.69749 ]
⇒ bb = [ -8.60233, -9.99730;  0.00000, -0.23250 ]
⇒  q = [ -0.58124, -0.81373; -0.81373,  0.58124 ]
⇒  z = [ 1, 0; 0, 1 ]

The Hessenberg-triangular decomposition is the first step in Moler and Stewart's QZ decomposition algorithm.

Algorithm taken from Golub and Van Loan, Matrix Computations, 2nd edition.

Loadable Function: s = schur (a)
Loadable Function: [u, s] = schur (a, opt)

The Schur decomposition is used to compute eigenvalues of a square matrix, and has applications in the solution of algebraic Riccati equations in control (see are and dare). schur always returns where is a unitary matrix and is upper triangular. The eigenvalues of are the diagonal elements of If the matrix is real, then the real Schur decomposition is computed, in which the matrix is orthogonal and is block upper triangular with blocks of size at most along the diagonal. The diagonal elements of (or the eigenvalues of the blocks, when appropriate) are the eigenvalues of and

The eigenvalues are optionally ordered along the diagonal according to the value of opt. opt = "a" indicates that all eigenvalues with negative real parts should be moved to the leading block of (used in are), opt = "d" indicates that all eigenvalues with magnitude less than one should be moved to the leading block of (used in dare), and opt = "u", the default, indicates that no ordering of eigenvalues should occur. The leading columns of always span the subspace corresponding to the leading eigenvalues of

Loadable Function: s = svd (a)
Loadable Function: [u, s, v] = svd (a)

Compute the singular value decomposition of a

The function svd normally returns the vector of singular values. If asked for three return values, it computes For example,

 
svd (hilb (3))

returns

 
ans =

  1.4083189
  0.1223271
  0.0026873

and

 
[u, s, v] = svd (hilb (3))

returns

 
u =

  -0.82704   0.54745   0.12766
  -0.45986  -0.52829  -0.71375
  -0.32330  -0.64901   0.68867

s =

  1.40832  0.00000  0.00000
  0.00000  0.12233  0.00000
  0.00000  0.00000  0.00269

v =

  -0.82704   0.54745   0.12766
  -0.45986  -0.52829  -0.71375
  -0.32330  -0.64901   0.68867

If given a second argument, svd returns an economy-sized decomposition, eliminating the unnecessary rows or columns of u or v.

Function File: [housv, beta, zer] = housh (x, j, z)

Computes householder reflection vector housv to reflect x to be jth column of identity, i.e., (I - beta*housv*housv')x =e(j) inputs x: vector j: index into vector z: threshold for zero (usually should be the number 0) outputs: (see Golub and Van Loan) beta: If beta = 0, then no reflection need be applied (zer set to 0) housv: householder vector

Function File: [u, h, nu] = krylov (a, v, k, eps1, pflg);

construct orthogonal basis U of block Krylov subspace; [v a*v a^2*v ... a^(k+1)*v]; method used: householder reflections to guard against loss of orthogonality eps1: threshhold for 0 (default: 1e-12) pflg: flag to use row pivoting (improves numerical behavior) 0 [default]: no pivoting; prints a warning message if trivial null space is corrupted 1 : pivoting performed

outputs: u: orthogonal basis of block krylov subspace h: Hessenberg matrix; if v is a vector then a u = u h otherwise h is meaningless nu: dimension of span of krylov subspace (based on eps1) if b is a vector and k > m-1, krylov returns h = the Hessenberg decompostion of a.

Reference: Hodel and Misra, "Partial Pivoting in the Computation of Krylov Subspaces", to be submitted to Linear Algebra and its Applications


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on July, 20 2006 using texi2html 1.76.