
This function performs numerically integration on the active data plot using the trapezoidal rule. Missing values are ignored. Moreover, the resulting area, peak location, peak width, and peak height (maximum deflection from the X axis), are written to the Result Log. In addition, this function supports integrating with a simple baseline which is a straight line crossing the end points.
To use this function:
The Integ1 X-Function is called to complete the calculation.
| Input |
Specify the input data to be integrated. |
|---|---|
| Use End Points Straight Line as Baseline |
Specify whether to create a straight line that crosses the end points and use it as the baseline for the integration. |
| Area Type |
Specify the integral area type. Please see more details in the Algorithm part below.
|
| Output |
Specify the range of the cumulative result. |
| Plot Integral Curve |
Specify whether to plot the integral curve, and where to plot the integral curve.
|
| Rescale Source Graph |
Specify whether to rescale the source graph when the integral is plotted into it. This check-box is available when the Plot Integral Curve is Source Graph. |
The idea of numerically integrate is calculating a definite integral by an approximate function:
Since the original data is discrete, we can use a pair of adjacent values to form a trapezoid for approximation:
As illustrate above, the curve is divided into pieces and we can calculate the sum of each trapezoid to estimate the integral by:
Given a baseline
, the mathematical area of
can be calculated by
If the sum of each trapezoid's area absolute value is computed, we can get the absolute area:
Take the curve in the following graph for example.
As illustrated above, the baseline is
and the curve is divided into five trapezoids (or triangles). The area of each trapezoid (or triangle) is calculated by
From the expression, we can know that
,
and
, which are above the baseline, are positive, but
and
, which are beneath the baseline, are negative.
So the mathematical area of this curve should be
and the absolute area of this curve should be
.