12.07.2015 Views

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

160 <strong>GNU</strong> <strong>Octave</strong>18.4 Famous MatricesThe following functions return famous matrix forms.hankel (c, r)Function FileReturn the Hankel matrix constructed given the first column c, and (optionally) thelast row r. If the last element of c is not the same as the first element of r, the lastelement of c is used. If the second argument is omitted, it is assumed to be a vectorof zeros with the same size as c.A Hankel matrix formed from an m-vector c, and an n-vector r, has the elements{ci+j−1 , i + j − 1 ≤ m;H(i, j) =r i+j−m , otherwise.hilb (n)Function FileReturn the Hilbert matrix of order n. The i, j element of a Hilbert matrix is definedas1H(i, j) =(i + j − 1)invhilb (n)Function FileReturn the inverse of a Hilbert matrix of order n. This can be computed computedexactly usingA ij = −1 i+j (i + j − 1)= p(i)p(j)(i + j − 1)( n + i − 1n − j) ( n + j − 1n − i) ( ) 2i + j − 2i − 2where( ) ( )k + n − 1 np(k) = −1 k k − 1 kThe validity of this formula can easily be checked by expanding the binomial coefficientsin both formulas as factorials. It can be derived more directly via the theoryof Cauchy matrices: see J. W. Demmel, Applied Numerical Linear Algebra, <strong>page</strong> 92.Compare this with the numerical calculation of inverse (hilb (n)), which suffersfrom the ill-conditioning of the Hilbert matrix, and the finite precision of your computer’sfloating point arithmetic.sylvester matrix (k)Return the Sylvester matrix of order n = 2 k .Function File

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!