vector to_matrix
with doc