Contents Previous Next Subchapters

Hankel Matrix
Syntax h = hankel(c)
h = hankel(cr)
See Also hilb

Description
Returns the Hankel matrix with elements of its first column corresponding to the vector c and with elements of its last row corresponding to the vector r.

If m is the length of the vector c and n is the length of the vector r, the return value h is the m x n matrix defined by
                 / c(i + j - 1)      if i + j - 1 < m
     h(ij)  = < 
                 \ r(i + j - m)      otherwise
Note that the first element of r is never used.

If the argument r is not present, the integer zero vector with the same length as c is used in its place.

Example
If you enter
     c = 1 : 1 : 3
     hankel(c)
O-Matrix will reply
     {
     [ 1 , 2 , 3 ]
     [ 2 , 3 , 0 ]
     [ 3 , 0 , 0 ]
     }
If you continue by entering
     r = 4 : -1 : 1
     hankel(c, r)
O-Matrix will reply
     {
     [ 1 , 2 , 3 , 3 ]
     [ 2 , 3 , 3 , 2 ]
     [ 3 , 3 , 2 , 1 ]
     }