Registered Member
|
Which is every column of a matrix multiplys a vector. Something like this:
If M is M << 1, 2, 6, 9, 3, 1, 7, 2; v is v<<2, 3; I want to get 2 4 12 18 9 3 21 6 |
Moderator
|
in other word you want to scale each rows, so:
M = v.asDiagonal() * M; |
Moderator
|
btw, moving to the "array world" should work too:
M = M.array().colwise() * v.array(); |
Registered Member
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]