Search Ordered Table VI
- Updated2025-07-30
- 2 minute(s) read
Works on the assumption that ordered x array is in monotonically increasing or decreasing order and can therefore efficiently search for the relative index of the location of x value within the x array. The VI starts the search at the starting index and begins by using a fast hunting phase to roughly bracket the location and then narrows to the final bracket using a bisection search. The VI computes the fractional index location by using linear interpolation.

Inputs/Outputs
ordered x array
—
ordered x array is the array of tabulated values of the dependent variable and must be monotonically increasing or decreasing.
x value
—
x value is the value whose relative location the VI needs to find within the x array.
starting index
—
starting index is the assumed initial search location. This value is usually set to the index of a previous search when the values to locate tend to be near each other in subsequent searches. The closer the starting index is to the true location of x value, the faster the search.
fractional index
—
fractional index is the relative index value of location of x value within the x array. |
ordered x array
—
x value
—
starting index
—
fractional index
—