Compute elementwise multiplication of a vector by each column in a matrix This is implemented for performance reasons, as it is much faster than sweep.

col_multiply(M, v)

Arguments

M

matrix

v

vector