| dmult {exvatools} | R Documentation |
Multiply a diagonal matrix by another matrix
Description
Fast multiplication of a diagonal matrix by another matrix, taking taking advantage of the properties of diagonal matrices.
Usage
dmult(matrix1, matrix2)
Arguments
matrix1 |
A diagonal matrix. |
matrix2 |
An ordinary matrix. |
Details
dmult() will turn matrix1 into a vector and multiply it
horizontally by every rows in matrix2. This saves precious computing
time.\
The number of rows and columns of the diagonal matrix1 must be
equal to the number of rows of matrix1.
Value
Product of matrix1 and matrix2.
See Also
Examples
wio <- make_wio("wiodtest")
dmult(wio$W, wio$Bd)
[Package exvatools version 0.8.0 Index]