Index Page
mxm_c
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Procedure
Abstract
Required_Reading
Keywords
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version
Index_Entries

Procedure

   void mxm_c ( ConstSpiceDouble   m1  [3][3],
                ConstSpiceDouble   m2  [3][3],
                SpiceDouble        mout[3][3] )

Abstract

   Multiply two 3x3 matrices.

Required_Reading

   None.

Keywords

   MATRIX


Brief_I/O

   VARIABLE  I/O              DESCRIPTION
   --------  ---  --------------------------------------------------
   m1        i   3x3 double precision matrix.
   m2        i   3x3 double precision matrix.
   mout      o   3x3 double precision matrix. mout is the product
                 m1*m2.

Detailed_Input

   m1         is an arbitrary 3x3 double precision matrix.

   m2         is an arbitrary 3x3 double precision matrix.

Detailed_Output

   mout       is a 3x3 double precision matrix. mout is the product
              m1*m2. mout may overwrite either m1 or m2.

Parameters

   None.

Exceptions

   Error free.

Files

   None.

Particulars

   The code reflects precisely the following mathematical expression

   For each value of the subscripts i and j from 1 to 3:

   mout(i,j) = summation from k=1 to 3 of  ( m1(i,k) * m2(k,j) )

   The intermediate results of the operation above are buffered in a
   temporary matrix which is later moved to the output matrix.
   Thus, to save space in the calling program, mout can be actually
   be m1 or m2 if desired without interfering with the computations.

Examples

   Let m1 = |  1.  1.  0. |
            |             |
            | -1.  1.  0. |
            |             |
            |  0.  0.  1. |


   and m2 = |  1.  0.  0. |
            |             |
            |  0.  1.  1. |
            |             |
            |  0. -1.  1. |

   then the call

      mxm_c ( m1, m2, mout );

   produces the matrix

   mout = |  1.  1.  1. |
          |             |
          | -1.  1.  1. |
          |             |
          |  0. -1.  1. |

Restrictions

   None.

Literature_References

   None.

Author_and_Institution

   E.D. Wright     (JPL)
   W.M. Owen       (JPL)

Version

   -CSPICE Version 1.0.0, 16-APR-1999 (EDW)

Index_Entries

   matrix times matrix 3x3_case

Link to routine mxm_c source file mxm_c.c

Wed Apr  5 17:54:39 2017