Mercurial > hg > minc-tools
changeset 1910:18d751e9d69a
* Hopefully the final bug-fix for the BiModalT calculation
author | rotor <rotor> |
---|---|
date | Mon, 06 Dec 2004 15:28:50 +0000 |
parents | a146ac63bb03 |
children | 27d303cf5650 |
files | progs/mincstats/mincstats.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/progs/mincstats/mincstats.c +++ b/progs/mincstats/mincstats.c @@ -5,7 +5,10 @@ * University of Queensland, Australia * * $Log: mincstats.c,v $ - * Revision 1.17 2004-11-01 22:38:39 bert + * Revision 1.18 2004-12-06 15:28:50 rotor + * * Hopefully the final bug-fix for the BiModalT calculation + * + * Revision 1.17 2004/11/01 22:38:39 bert * Eliminate all references to minc_def.h * * Revision 1.16 2004/10/18 08:20:35 rotor @@ -652,8 +655,8 @@ /* BiModal Threshold */ zero_moment += pdf[c]; first_moment += hist_centre[c] * pdf[c]; - - if(c > 0) { + + if(c > 0 && zero_moment > 0.0 && zero_moment < 1.0) { var = SQR((stats->mean * zero_moment) - first_moment) / (zero_moment * (1 - zero_moment));