GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
m_mult.c
Go to the documentation of this file.
1
/* @(#)m_mult.c 2.1 6/26/87 */
2
#include <stdio.h>
3
#include <grass/libtrans.h>
4
5
#define N 3
6
7
/*
8
* m_mult: matrix multiplication (return c = a * b)
9
* 3x3 matric by 3x1 matric
10
*/
11
12
int
m_mult
(
double
a[
N
][
N
],
double
b
[N],
double
c[N])
13
{
14
register
int
i, j;
15
16
for
(i = 0; i <
N
; i++) {
17
c[i] = 0.0;
18
19
for
(j = 0; j <
N
; j++)
20
c[i] += (a[i][j] *
b
[j]);
21
}
22
23
return
1;
24
}
lib
vector
transform
m_mult.c
Generated on Sun Sep 9 2012 18:55:33 for GRASS Programmer's Manual by
1.8.1.2