Registered Member
|
Hello world!
How can i get a left matrix-vector multiplication using eigen? |
Registered Member
|
Do you mean M*V or V*M?
You need to obey the way that matrix multiplication works; Eigen vectors are simply matrices with one row or one column. Matrix<float, 1, 3> V1; Matrix<float, 3, 1> V2; Matrix<float, 3, 3> M; Allows you to say float f = V1 * M * V2; |
Moderator
|
to complete the answer, you might also need .transpose() to transform a column vector to a row one:
Matrix<float, 3, 1> V2; Matrix<float, 3, 3> M; V2.transpose() * M |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar