GRASS Programmer's Manual
6.5.svn(2014)-r66266
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
}
b
float b
Definition:
named_colr.c:8
m_mult
int m_mult(double a[N][N], double b[N], double c[N])
Definition:
m_mult.c:12
N
#define N
Definition:
m_mult.c:5
lib
vector
transform
m_mult.c
Generated on Sat Jan 2 2016 01:46:48 for GRASS Programmer's Manual by
1.8.5