mirror of
https://github.com/nasa/trick.git
synced 2025-02-04 02:01:23 +00:00
14a75508a3
Changed all header file once include variables to follow the same naming convention and not start with any underscores. Also deleted old incorrect copyright notices. Also removed $Id: tags from all files. Fixes #14. Fixes #22.
25 lines
647 B
C
25 lines
647 B
C
/*
|
|
PURPOSE: (Matrix transpose times vector)
|
|
ASSUMPTIONS AND LIMITATIONS: ((Square matrix))
|
|
PROGRAMMERS: (((Les Quiocho) (NASA/JSC) (Jan 1993) (v1.0) (Init Release)))
|
|
*/
|
|
|
|
#include "../include/trick_math.h"
|
|
|
|
void transxvec(double *prod, /* Out: Product of the two matrices */
|
|
double **mat, /* In: Matrix 1 */
|
|
double *vec, /* In: Matrix 2 */
|
|
int n)
|
|
{ /* In: Array size */
|
|
int i, k;
|
|
|
|
for (i = 0; i < n; i++) {
|
|
prod[i] = 0.0;
|
|
for (k = 0; k < n; k++) {
|
|
prod[i] += mat[k][i] * vec[k];
|
|
}
|
|
}
|
|
|
|
return;
|
|
}
|