Threshold 1D Array

Compares threshold y to the values in array of numbers or points starting at start index until it finds a pair of consecutive elements such that threshold y is greater than the value of the first element and less than or equal to the value of the second element. The connector pane displays the default data types for this polymorphic function. Details

array of numbers or points can be an array of numbers or an array of points where each point is a cluster of x and y coordinates. If this input is an array of points, the function uses the first element in the cluster (x) to obtain a fractional index by linear interpolation. The function then uses this fractional index to compute the output y value from the second cluster element (y).
If threshold y is less than or equal to the array value at start index, the function returns start index for fractional index or x. If threshold y is greater than every value in the array, the function returns the index of the last value. If the array is empty, the function returns NaN.
start index must be a number. The default is 0, which means the function returns the result calculated from the entire array, rather than a specified section of the array.
fractional index or x is the interpolated result LabVIEW calculates for the array of numbers or points 1D input array. For example, suppose array of numbers or points is an array of four numbers [4, 5, 5, 6], start index is 0, and threshold y is 5. The fractional index or x is 1, corresponding to the index of the first value of 5 the function finds. Suppose the array elements are 2.3, 5.2, 7.8, 7.9, 10.0, the start index is 0, and the threshold y is 6.5. The output is 1.5 because 6.5 is halfway between 5.2 (index 1) and 7.8 (index 2). If threshold y is greater than 7 for the same set of numbers, the output is 1.69. If threshold y is 14.2, start index is 5, and the values in the array starting at index 5 are 9.1, 10.3, 12.9, and 15.5, threshold y falls between elements 7 and 8 because 14.2 is midway between 12.9 and 15.5. The value for fractional index or x is 7.5, that is, halfway between 7 and 8.

If the array input consists of an array of points where each point is a cluster of x and y coordinates, the output is the interpolated x value corresponding to the interpolated position of threshold y rather than the fractional index of the array. If the interpolated position of threshold y is midway between indices 4 and 5 of the array with x values of –2.5 and 0 respectively, the output is not an index value of 4.5 as it would be for a numeric array, but rather an x value of –1.25.

Threshold 1D Array Details

The function then calculates the fractional distance between the first value and threshold y and returns the fractional index at which threshold y would be placed within array of numbers or points using linear interpolation.

Note  The Threshold 1D Array function requires the values in array of numbers or points to be sorted in non-decreasing order.