Registered Member
|
Hello!
How can I multiply matrizes with vectors row-wise? for example: Mat1= a11, a12 a21, a12 a31, a31 Mat2= b1, b2 Mat1*Mat2= a11*b1, a12*b2 a21*b1, a12*b2 a31*b1, a31*b2 I know that it is possible to use the for loop, but I hope there is some oprimized eigen function/solution for such a problem. |
Moderator
|
Mat1 * Mat2.asDiagonal()
and yes this kind of product is optimized and vectorized. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]