home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------//
-
- // Synopsis: Lotkin matrix.
-
- // Syntax: A = lotkin ( N )
-
- // Description:
-
- // A is the Hilbert matrix with its first row altered to all
- // ones. A is unsymmetric, ill-conditioned, and has many
- // negative eigenvalues of small magnitude. The inverse has
- // integer entries and is known explicitly.
-
- // Reference:
- // M. Lotkin, A set of test matrices, MTAC, 9 (1955),
- // pp. 153-161.
-
- // This file is a translation of lotkin.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.
-
- //-------------------------------------------------------------------//
-
- lotkin = function ( n )
- {
- local (n)
-
- A = hilb(n);
- A[1;] = ones(1,n);
-
- return A;
- };
-