Chronology | Current Month | Current Thread | Current Date |
[Year List] [Month List (current year)] | [Date Index] [Thread Index] | [Thread Prev] [Thread Next] | [Date Prev] [Date Next] |
I regularly do this type of calculation and so will proffer the method
that I have always used. I believe it to be correct (or else, why would I
use it) but it also seems that there must be a more mathematically
rigorous method. I do know that this method leads to proper normalization
(always handy if you want meaningful numbers).
1) during the numerical integration, make the 1st step 1/2 my initial step
size and make all subsequent steps (except for the last one in a "peak"
equal to the initial step size;
2) always integrate on increasing slope
(L2R if +value & +slope,
R2L if +value & -slope\,
L2R if -value & +slope,
R2L if -value & -slope);
3) add the +areas separately (from the -areas) adding small terms to large
(this is only necessary if there are multiple MAX's and MIN's);