OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
GEO_mat_vec_mul3.c
Go to the documentation of this file.
1 /* file: GEO_mat_vec_mul3.c */
2 
3 #include "GEO_basic.h"
4 #include "GEO_util.h"
5 
7  double mat[3][3],
8  double vec1[3],
9  double vec[3]
10  )
11 {
12 /*
13 !C*****************************************************************************
14 !Description: subroutine in the utility functions of the Level-1A geolocation
15  software to perform multiplication of a matrix and a vector.
16 
17 !Input Parameters:
18  double mat[3][3] - the 3x3 matrix
19  double vec1[3] - the vector (with 3 elements)
20 
21 !Output Parameters:
22  double vec[3] - output vector with 3 elements
23 
24 !Revision History:
25  $Log: GEO_mat_vec_mul3.c,v $
26  Revision 1.4 1997/07/21 16:24:34 kuyper
27  Baselined Version 1
28 
29  * Revision 1.4 1997/03/26 18:10:14 fhliang
30  * Initial revision of SDST delivery of GEO_mat_vec_mul3.c.
31  *
32  Revision 1.3 1996/07/23 23:28:50 kuyper
33  Inserted required '!'s in comments.
34  Changed to return void, not int.
35  Changed constants to double, to avoid conversions.
36 
37  Revision 1.2 1996/07/18 19:49:36 kuyper
38  Included self-checking header file.
39 
40 
41  4/5/95
42  Ruiming Chen
43  Finished coding.
44 
45  6/12/95
46  Frederick S. Patt (patt@modis-xl.gsfc.nasa.gov)
47  Revised prolog
48 
49 !Team-unique Header:
50  This software is developed by the MODIS Science Data Support
51  Team for the National Aeronautics and Space Administration,
52  Goddard Space Flight Center, under contract NAS5-32373.
53 
54 !END*************************************************************************
55 */
56 
57  int i = 0; /* iteration parameter */
58  int j = 0; /* iteration parameter */
59 
60  /* multiplication of a matrix mat[3][3] and a vector vec1[3] */
61  for (i = 0; i < 3; ++i) {
62  vec[i] = 0.0;
63  for (j = 0; j < 3; ++j)
64  vec[i] += mat[i][j] * vec1[j];
65  }
66 
67  return;
68 }
int j
Definition: decode_rs.h:73
void GEO_mat_vec_mul3(double mat[3][3], double vec1[3], double vec[3])
int i
Definition: decode_rs.h:71