03-23-2015 12:19 PM
Hi,
I'm having a very weird issue. I simulate data with a sinus function in a while loop and i keep the values < 0.7 into a vector. When the sinus values are over 0.7, I remove the vector. etc.
I would like to get the maximum index of the vector at each iteration of the loop. Nevertheless, i get an index equal to zero while the vector has a size > 0.
This is really strange because if I put the values of the iteration instead of the values of the sinus, the founded index is correct (the only difference is that the iteration number is an integer while the sinus is a decimal number).
Do someone understand something ?
Thanx for your help
Andrew
Solved! Go to Solution.
03-23-2015 12:50 PM - edited 03-23-2015 12:53 PM
Instead of "delete from array", just leave the TRUE case empty and "use default if unwired" on the array output tunnel.
Once the sine is again <0.7, you are on the descending branch, so the first element is always the largest for a while. Nothing wrong with that.
I would also place the indicators after the case structure so they update under all conditions.
Array min&Max will give you the index of the element with the largest value. If you want to know the size of the array, use the "array size" function.
03-23-2015 03:56 PM
Thanx for your answer. Everything is clear now!