[ODE] Matrix * vector?
Francisco Jesús Martínez Serrano
franjesus at medtelecom.net
Thu Jun 19 16:54:02 2003
El Jueves, 19 jun, 2003, a las 20:23 Europe/Madrid, Amund Børsand
escribió:
>
> Is there a function in ODE to multiply a vector by a matrix (the
> standard thing to do to rotate a vector by a matrix) ?
dMultiply0, dMultiply1, dMultiply2.
To rotate a vector V by a matrix M, try:
dMultiply0(Result,M,V,3,3,1);
To multiply matrices together use instead:
dMultiply0(Result,M1,M2,3,3,3);
If you want to do it while transposing at the same time the matrix, use
dMultiply1, dMultiply2 transposes both arguments (I believe, don't
remember well).
Try grepping the ode source-code for dMultiply0 or dMULTIPLY0_331. If I
remember correctly, they are documented in the comments.
Cheers.