From: hackbard Date: Thu, 30 Sep 2004 14:38:05 +0000 (+0000) Subject: calc average X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5643e82d7e77ee5e324beb16e9f91008c4dafaf;p=physik%2Fnlsop.git calc average --- diff --git a/parse_trim_collision.c b/parse_trim_collision.c index 5469bfa..eed12c5 100644 --- a/parse_trim_collision.c +++ b/parse_trim_collision.c @@ -30,6 +30,7 @@ int main(int argc,char **argv) { int fd,ion,i,j; int z,skipped; + int avg1,avg2; double en; double max_e; int max_chfi,max_th; @@ -49,6 +50,8 @@ int main(int argc,char **argv) { ion=1; skipped=0; + avg1=0; + avg2=0; for(i=0;imax_e) max_e=Z[i].energy; if(Z[i].total_hits>max_th) max_th=Z[i].total_hits; if(Z[i].cell_hits_from_ions>max_chfi) max_chfi=Z[i].cell_hits_from_ions; + avg1+=Z[i].total_hits; + avg2+=Z[i].cell_hits_from_ions; } for(i=0;i