How do I use the "search 1D array" primative?
Posted 15 April 2012 - 09:37 PM
Lecturer in Condensed Matter Physics
School of Physics and Astronomy
University of Leeds, UK
Posted 16 April 2012 - 02:35 PM
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.
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.
"Maybe Hoovah is really Crelf's alter-ego, which he uses to irk people?" - Gary Rubin
"Seemingly minor changes....can mean the difference between a working app and a quivering heap of unresponsive code." - David Boyd
Posted 21 April 2012 - 07:13 PM
I just tried to give an example of where this function could be used. Its a powerful function and could be used in many ways. Just use your imagination
Posted 02 May 2012 - 01:29 PM
It sounds like you don't have much programming experience, so it's not clear what kind of answer you are expecting beyond what has already been said. The only other thing I will add is to not use this to search an array of floating point values. If you do not understand why that is, I'd suggest starting here: http://stackoverflow...actly-in-binary