Computes the median of Y values in a sliding window around each target x position.
For each value in xValues, the closest index in data.x is found and the median
of the surrounding y values (within the window) is returned.
Parameters
data: DataXY
Object with x (sorted in increasing order) and y arrays of the same length.
xValues: NumberArray
Array of x positions at which to compute the median.
Computes the median of Y values in a sliding window around each target x position. For each value in xValues, the closest index in data.x is found and the median of the surrounding y values (within the window) is returned.