Changeset 3894 for trunk/Ohana/src/opihi/lib.data/gaussian.c
- Timestamp:
- May 11, 2005, 9:35:40 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.data/gaussian.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.data/gaussian.c
r2598 r3894 1 1 # include "data.h" 2 2 3 static int Ngaussint ;3 static int Ngaussint = 0; 4 4 static double *gaussint; 5 5 … … 24 24 double mean, sigma; 25 25 26 /* no need to generate this if it already exists */ 27 if (Ngaussint == Nbin) return; 28 26 29 A = time(NULL); 27 30 for (B = 0; A == time(NULL); B++); … … 45 48 3.0*gaussian(x+dx3, mean, sigma)) * (dx1/8.0); 46 49 val += df; 47 if (val > (i / (double) Ngaussint)) {50 if (val > (i + 0.5) / (double) Ngaussint) { 48 51 gaussint[i] = x + dx / 2.0; 49 52 i++; … … 65 68 } 66 69 70 double int_gauss (int i) { 71 double y; 72 y = gaussint[i]; 73 return (y); 74 } 75
Note:
See TracChangeset
for help on using the changeset viewer.
