14.11.2012 Views

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

B.1. Microprocessor Code 115<br />

b[1] = A[1][0] * x[0] / 100 + A[1][1] * x[1] / 100<br />

+ A[1][2] * x[2] / 100;<br />

b[2] = A[2][0] * x[0] / 100 + A[2][1] * x[1] / 100<br />

+ A[2][2] * x[2] / 100;<br />

}<br />

void vectorByMatrix4x1(double A[][4], double x[4],<br />

double b[4]) {<br />

b[0] = A[0][0] * x[0] + A[0][1] * x[1] + A[0][2] * x[2]<br />

+ A[0][3] * x[3];<br />

b[1] = A[1][0] * x[0] + A[1][1] * x[1] + A[1][2] * x[2]<br />

+ A[1][3] * x[3];<br />

b[2] = A[2][0] * x[0] + A[2][1] * x[1] + A[2][2] * x[2]<br />

+ A[2][3] * x[3];<br />

b[3] = A[3][0] * x[0] + A[3][1] * x[1] + A[3][2] * x[2]<br />

+ A[3][3] * x[3];<br />

}<br />

void Matrix_Mult(double a1[][4], double a2[][4],<br />

double a3[][4]) {<br />

int i = 0;<br />

int j = 0;<br />

int k = 0;<br />

int a = 4;<br />

int b = 4;<br />

int c = 4;<br />

for (i = 0; i < a; i++)<br />

for (j = 0; j < b; j++)<br />

for (k = 0; k < c; k++)<br />

a3[i][j] += a1[i][k] * a2[k][j];<br />

}<br />

void Matrix_Mult3334(double a1[][3], double a2[][4],<br />

double a3[][4]) {<br />

int i = 0;<br />

int j = 0;<br />

int k = 0;<br />

for (i = 0; i < 3; i++)<br />

for (j = 0; j < 4; j++)<br />

for (k = 0; k < 3; k++)<br />

a3[i][j] += a1[i][k] * a2[k][j];<br />

}<br />

void Matrix_Mult3443(double a1[][4], double a2[][3],<br />

double a3[][3]) {<br />

int i = 0;<br />

int j = 0;<br />

int k = 0;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!