hankel.RdGenerate Hankel matrix from column and row vector
hankel(a, b)hankel(a) returns the square Hankel matrix whose first column is
a and whose elements are zero below the secondary diagonal. (I.e.:
b may be missing.)
hankel(a, b) returns a Hankel matrix whose first column is a
and whose last row is b. If the first element of b differs
from the last element of a it is overwritten by this one.
matrix of size (length(a), length(b))
hankel(1:5, 5:1)
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 1 2 3 4 5
#> [2,] 2 3 4 5 4
#> [3,] 3 4 5 4 3
#> [4,] 4 5 4 3 2
#> [5,] 5 4 3 2 1