home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------//
-
- // Synopsis: Kac-Murdock-Szego Toeplitz matrix.
-
- // Syntax: A = kms ( N , RHO )
-
- // Description:
-
- // A is the N-by-N Kac-Murdock-Szego Toeplitz matrix with
- // A[i;j] = RHO^(ABS((i-j))) (for real RHO).
-
- // If RHO is complex, then the same formula holds except that
- // elements below the diagonal are conjugated. RHO defaults to
- // 0.5.
-
- // Properties:
- // A has an LDL' factorization with
- // L = INV(TRIW(N,-RHO,1)'),
- // D[i;i] = (1-ABS(RHO)^2)*EYE(N,N) except D[1;1] = 1.
- // A is positive definite if and only if 0 < ABS(RHO) < 1.
- // INV(A) is tridiagonal.
-
- // Reference:
- // W.F. Trench, Numerical solution of the eigenvalue problem
- // for Hermitian Toeplitz matrices, SIAM J. Matrix Analysis and Appl.,
- // 10 (1989), pp. 135-146 (and see the references therein).
-
- // This file is a translation of kms.m from version 2.0 of
- // "The Test Matrix Toolbox for Matlab", described in Numerical
- // Analysis Report No. 237, December 1993, by N. J. Higham.
-
- //-------------------------------------------------------------------//
-
- kms = function ( n , rho )
- {
- local (n, rho)
-
- if (!exist (rho)) { rho = 0.5; }
-
- A = (1:n)'*ones(1,n);
- A = abs(A - A');
- A = rho .^ A;
- if (imag(rho))
- {
- A = conj(tril(A,-1)) + triu(A);
- }
-
- return A;
- };
-