02-09-2016 05:31 PM - edited 02-09-2016 05:32 PM
Hi all,
I wander if there is someone can help me to solve this issue....
Let's say I have 100,000 element {0,1,2,....... 99999}, and they are distiributed in an unsequence order. Then, we want to choose only the numbers which are above 80,000. How can I do it? Thanks in advance
Regards
Solved! Go to Solution.
02-09-2016 05:51 PM
fast way is use sort 1d array search to nearest value bigger that 80,000 and delete from array
but if position of your value is important best way is use
02-09-2016 05:58 PM
What do you want to do with the data after you have found the elements you want?
You could sort them and then use Search 1D Array. All of the larger elements will be at or after the index returned by search. Of course this destorys the original order.
Use Greater? comparison. Connect the array to the top input and a constant = 80000 to the lower input. The output will be an array of booleans with Trues in each element corresponding to an element about 80000 in the data.
Run the data through a for loop. Put the Greater? comparison inside the loop. Wire the data to an output tunnel. Change the Tunnel Mode to Conditional and wire the output of Greater? to the "?" input of the tunnel.
Lynn
02-09-2016 06:03 PM - edited 02-09-2016 06:04 PM
If using 2013 or newer, conditional tunnels are your friend.
02-10-2016 04:31 AM
Hi all,
I am so grateful for your support, It's really helpful. One more question if you don't mind....
I have the array in the attached photo and Vi has 39 elements. these elements change it's position every time. As I told you before, I want to seperate the 3 elements of the lowest values which are (-150) and put them in the first array, then I want the next element start comming in the array after those three elements, and finally save again the remaining three elements -150 at the end of the array as per attached in result photo. But as you can see the worest case when the 6 elements of -150 come after each other..
Sorry for disturb you, I know it's challenge,but I am sure you are more proeffesional than me.Thanks in advance
Regards