CCL Home Page
Up Directory CCL mat_multiply
#include "utility.h"

void mat_multiply(matrix1,matrix2,matrix3)
/*============================================================================*/
/* PURPOSE:  MULTIPLY TWO THREE BY THREE MATRIXES.
/* INPUTS:
/*	MATRIX1		FIRST THREE BY THREE MATRIX.
/*	MATRIX2		SECOND THREE BY THREE MATRIX.
/* OUTPUTS:
/*	MATRIX3		PRODUCT OF MATRIX1 AND MATRIX2.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 11 JUNE 1991 MVG
*/
   double matrix1[3][3];
   double matrix2[3][3];
   double matrix3[3][3];
   {
   int i;
   int j;

   for (i=0; i<3; i++)
      {
      for (j=0; j<3; j++)
         {
         matrix3[i][j]=matrix1[i][0]*matrix2[0][j] + matrix1[i][1]*matrix2[1][j] + matrix1[i][2]*matrix2[2][j];
         }
      }

   return;
   }
Modified: Fri Feb 11 17:00:00 1994 GMT
Page accessed 4986 times since Sat Apr 17 21:58:57 1999 GMT