Skip to main content

faverageXY

faverageXY (XWaveName, YWaveName [, x1, x2 ])

The faverageXY function returns the trapezoidal average value of YWaveName from x=x1 to x=x2, using X values from XWaveName.

This function operates identically to faverage, except that it uses an XY pair of waves for X and Y values and it does not work with complex waves.

Details

If x1 and x2 are not specified, they default to -inf and +inf, respectively.

If x1 or x2 are not within the X range of XWaveName, faverageXY limits them to the nearest X range limit of XWaveName.

faverageXY returns the area divided by (x2 -x1).

If any values in the X range are NaN, faverageXY returns NaN.

Reversing the order of x1 and x2 does not change the sign of the returned value.

The values in XWaveName may be increasing or decreasing. faverageXY assumes that the values in XWaveName are monotonic. If they are not monotonic, Igor does not complain, but the result is not meaningful.

The faverageXY function is not multidimensional aware. See Multidimensional Waves, particularly Analysis on Multidimensional Waves for details.

See Also

Integrate, area, areaXY, faverage, PolygonArea