| GNU Octave Manual by John W. Eaton Paperback (6"x9"), 324 pages, 4 figures ISBN 0954161726 RRP £19.99 ($29.99) |
15.4 Famous Matrices
The following functions return famous matrix forms.
- Function File: hankel (c, r)
- Return the Hankel matrix constructed given the first column c, and
(optionally) the last row r. If the last element of c is
not the same as the first element of r, the last element of
c is used. If the second argument is omitted, the last row is
taken to be the same as the first column.
A Hankel matrix formed from an m-vector c, and an n-vector r, has the elements
H (i, j) = c (i+j-1), i+j-1 <= m; H (i, j) = r (i+j-m), otherwise
- Function File: hilb (n)
- Return the Hilbert matrix of order n. The
i, j
element of a Hilbert matrix is defined as
H (i, j) = 1 / (i + j - 1)
- Function File: invhilb (n)
- Return the inverse of a Hilbert matrix of order n. This is exact.
Compare with the numerical calculation of
inverse (hilb (n)), which suffers from the ill-conditioning of the Hilbert matrix, and the finite precision of your computer's floating point arithmetic.
- Function File: sylvester_matrix (k)
- Return the Sylvester matrix of order n = 2^k.
- Function File: toeplitz (c, r)
- Return the Toeplitz matrix constructed given the first column c,
and (optionally) the first row r. If the first element of c
is not the same as the first element of r, the first element of
c is used. If the second argument is omitted, the first row is
taken to be the same as the first column.
A square Toeplitz matrix has the form
c(0) r(1) r(2) ... r(n) c(1) c(0) r(1) r(n-1) c(2) c(1) c(0) r(n-2) . . . . . . c(n) c(n-1) c(n-2) ... c(0)
- Function File: vander (c)
- Return the Vandermonde matrix whose next to last column is c.
A Vandermonde matrix has the form
c(0)^n ... c(0)^2 c(0) 1 c(1)^n ... c(1)^2 c(1) 1 . . . . . . . . . . . . c(n)^n ... c(n)^2 c(n) 1
| ISBN 0954161726 | GNU Octave Manual | See the print edition |