Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Search 1D Array Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Array Functions

Requires: Base Development System

Searches for an element in a 1D array starting at start index. Because the search is linear, you need not sort the array before calling this function. LabVIEW stops searching as soon as the element is found.

The connector pane displays the default data types for this polymorphic function.

Details  

1D array can be a 1D array of any type.
element is the value to search for in the input array. The representation of element should match the representation of 1D array.
start index must be numeric. The default is 0.
index of element is the index where element is found. If the function does not find element, index of element is –1.

Search 1D Array Details

You cannot use this function to retrieve the index of a value that is not an element of the array. For example, if you have an array of two elements (0.0 and 1.0), this function does not find the index of the value 0.5, as that value is not an element of the array. Use the Threshold 1D Array to find a fractional index.

This function only finds a string if the element you specify matches an array element exactly. For example, if you have an array of two elements (upper limit and lower limit), this function does not find the index of the value limit, because limit does not match an array element exactly. To search a string for any occurrence of a regular expression, such as in the previous example, use the Match Regular Expression function.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit