Generate a constant matrix or vector like an existing matrix or vector
stm_constant_like.Rd
stm_constant_like()
generates a constant matrix or vector that
matches the dimensions of the provided input matrix or vector.
Details
The function checks the validity of the input vmat
and k
,
converting vmat
to a matrix if it is a vector. It then generates
a matrix of the same size as vmat
filled with the constant value
k
.