03-25-2019 03:34 AM
Hello,
I am having a curve and I need a starting tangent of it, but random amount of values at start are useless so I need to find threshold, where the actual curve begins. For that purpose I built an array of the measured values and tried to find first value greater than certain number and it's index. I tried several ways to do that posted here on forum, but with no success.
I am having a LW 2009, could sb post a simplest possible VI that just finds first value in array greater than constant, and returns it's index?
And one minor question, is it better to build array of each value or just pull out graph history?
Solved! Go to Solution.
03-25-2019 04:29 AM - edited 03-25-2019 04:32 AM
03-25-2019 05:13 AM
Well, I tried that, but I am unsure how this will work on real data with some fluctuations (meaning not sorted).
03-25-2019 05:35 AM
03-25-2019 06:00 AM
I will usually do a comparison of the array, then search the output array for instances of true.
0xDEAD
03-25-2019 06:44 AM
Tried for loop but the result was somewhat inconsistent, not sure what I've done wrong.
Will try the boolean array.
07-10-2019 09:03 AM
Just noticed a mistake in this.
"Greater than zero" should be replaced with "Greater than or equal to zero" or it will miss a match if it is the zeroth element of the array.
07-11-2019 07:04 AM
Here is an alternate method.