Fast multiplication of a matrix by a diagonal matrix, taking advantage
of the properties of diagonal matrices.
Usage
multd(matrix1, matrix2)
Value
The product of matrix1 and matrix2.
Arguments
matrix1
An ordinary matrix.
matrix2
A diagonal matrix.
Details
multd() will turn matrix2 into a vector and multiply it
horizontally by every row in matrix1. This saves precious computing
time.\
The number of columns of matrix1 must be equal to the rows and
columns of diagonal matrix2.