matvec.RdMultiply the rows or columns of a matrix by the elements of a vector.
matvec(M, v)
vecmat(v, M)A matrix of the same dimensions as M.
matvec(M,v) is equivalent to M %*% diag(v) but is faster to execute.
Similarly vecmat(v,M) is equivalent to diag(v) %*% M but is faster to execute.