hankel

Computes the Hankel matrix.

Syntax

H = hankel(C)

H = hankel(C, R)

Inputs

C
A vector used to assign the first column of the Hankel matrix.
R
A vector used to assign the last row of the Hankel matrix.

Outputs

H
The Hankel matrix.

Examples

One input:
c = [1:3];
h = hankel(c)
h = [Matrix] 3 x 3
1  2  3
2  3  0
3  0  0
Two inputs:
c = [1:3];
r = [3,8:10];
h = hankel(c, r)
h = [Matrix] 3 x 4
1  2  3   8
2  3  8   9
3  8  9  10

Comments

hankel(c) assigns the elements of c to the first column of the Hankel matrix, and zeros to the remaining elements of its last row.

hankel(c, r) assigns the elements of c to the first column of the Hankel matrix, and the elements of r to its last row, ignoring r(1). Typically, r(1) = c(end).

The remainder of the Hankel matrix is assigned by copying the elements of the first column and the last row along each anti-diagonal.