Create Hankel matrix
stm_hankel.Rd
stm_hankel()
generates a Hankel matrix from two vectors, where
the first vector forms the first column and the second vector forms the
first row of the matrix. If the second vector is not provided, the last
element of the first vector is used to initialize the first element of
the second vector.
Details
The function constructs a Hankel matrix where the first column is formed
from vec1
and the first row is formed from vec2
. If vec2
is not provided, the last element of vec1
is used as the first element
of vec2
. The matrix is populated such that each element in the
matrix is determined by the sum of its row and column index.