Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sign change in an array

I have an array of values. How do I determine which element went from a + to - or - to + ?
0 Kudos
Message 1 of 2
(3,213 Views)
LabVIEW's "Threshold 1D Array" VI (located in the Array subpalette of the Functions palette) may be helpful for you.

If you set the threshold input to 0 and the index input to the start of your array, it will basically search through the array and return the first index where the element value changes from negative to positive. Then if you call the "Reverse 1D Array" function, it could detect the positive to negative value changes from the original array.

For a detailed explanation of this VI, please see its associated help file in LabVIEW (place the VI on your block diagram, right-click, and select Help).

Hope this helps!

Sonya
Message 2 of 2
(3,213 Views)