[ODE] matrix multiplication

Henri Hakl henri at cs.sun.ac.za
Wed Mar 12 05:51:02 2003


It's quite simple, consider:

A = B * C

if B is a 5 x 3 matrix and C is a 3 x 4 matrix then A will be a 5 x 4
matrix, (B's second and C's first parameter HAVE to be the same, the
resultant matrix has dimensions according to B's first and C's second
parameter), accordingly you'd use:

dMultiply0(A, B, C, 5, 3, 4)


----- Original Message -----
From: "Fig TaTam" <fig_tatam@hotmail.com>
To: <ODE@q12.org>
Sent: Wednesday, March 12, 2003 12:32 PM
Subject: [ODE] matrix multiplication


> ok, I figured out how to do that rotation I wanted, so don't respond to
> topic "Re: [ODE] rotation matrix from normalized vector?"
>
> But now I have a question about matrix multiplication. Ode has a function
> for that described as:
>
> /* matrix multiplication. all matrices are stored in standard row format.
> * the digit refers to the argument that is transposed:
> *   0:   A = B  * C   (sizes: A:p*r B:p*q C:q*r)
> *   1:   A = B' * C   (sizes: A:p*r B:q*p C:q*r)
> *   2:   A = B  * C'  (sizes: A:p*r B:p*q C:r*q)
> * case 1,2 are equivalent to saying that the operation is A=B*C but
> * B or C are stored in standard column format.
> */
>
> void dMultiply0 (dReal *A, const dReal *B, const dReal *C, int p,int q,int
> r);
>
> What I don't understand is what I'm supposed to pass as 'p', 'q', and 'r'.
> Anyone know?
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode