m_mult.c

Go to the documentation of this file.
00001 /*  @(#)m_mult.c        2.1  6/26/87  */
00002 #include <stdio.h>
00003 #include <grass/libtrans.h>
00004 
00005 #define         N       3
00006 
00007 /*
00008  * m_mult: matrix multiplication (return c = a * b)
00009  *  3x3 matric by 3x1 matric
00010  */
00011 
00012 int 
00013 m_mult (double a[N][N], double b[N], double c[N])
00014 {
00015     register int i, j;
00016 
00017     for (i = 0; i < N; i++)
00018          {
00019         c[i] = 0.0;
00020 
00021         for (j = 0; j < N; j++)
00022                 c[i] += (a[i][j] * b[j]);
00023          }
00024 
00025     return 1;
00026 }

Generated on Sun Apr 6 17:32:44 2008 for GRASS by  doxygen 1.5.5