ml-spectra-processing
    Preparing search index...

    Function xyInterpolateLinear

    • Interpolate y values at target x positions using linear interpolation. This is useful for upsampling or resampling data to specific x positions. Both the input data and target x values must be sorted in ascending order. Uses a two-pointer approach with O(n + m) complexity.

      Parameters

      • data: DataXY

        Object that contains property x (an ordered increasing array) and y (an array)

      • xTarget: DoubleArray

        Target x positions where y values should be interpolated

      Returns Float64Array

      • Interpolated y values at target x positions