vechs2full(x)
vechs2full(vechs(x))
is equal to x
with zero along the diagonal if x
is symmetric. Note that very few vectors have the correct number of elements to construct a symmetric matrix. For example, vectors with 1, 3, 6, 10, and 15 elements can be used to make a symmetric matrix, but none of the other numbers between 1 and 15 can. An error is thrown if the number of elements in x
cannot be used to make a symmetric matrix.
vech2full
, vech
, vechs
, rvectorize
, cvectorize
vechs2full(1:10)
matrix(1:16, 4, 4)
vechs(matrix(1:16, 4, 4))
vechs2full(vechs(matrix(1:16, 4, 4)))
Run the code above in your browser using DataLab