<hankel-matrix> ( n -- matrix )
Extra matrix operations

Prev:<box-matrix> ( r -- matrix )
Next:<hilbert-matrix> ( m n -- matrix )


Vocabulary
math.matrices.extras

Inputs
nan integer


Outputs
matrixa matrix


Word description
A Hankel matrix is a symmetric, square-matrix in which each ascending skew-diagonal from left to right is constant. See hankel matrix.

The following is true of any Hankel matrixA: A[i][j] = A[j][i] = a[i+j-2].

The <toeplitz-matrix> is an upside-down Hankel matrix.

The <hilbert-matrix> is a special case of the Hankel matrix.

Examples
USING: math.matrices.extras prettyprint ; 4 <hankel-matrix> .
{ { 1 2 3 4 } { 2 3 4 0 } { 3 4 0 0 } { 4 0 0 0 } }


Definition