SignalUtils.FindNearest Method

function FindNearest(const Data: TVec; ASample: Double): Integer;

Return the index of the nearest value.

#NameTypeDescription
1DataTVec
2ASampleDoublescalar

Returns: Int32

Remarks:

Return the index of the value within data where the expression abs(Data[Index]- ASample) is smallest.