LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extraction of 1 data from each range interval

Solved!
Go to solution

Hi guys

 

I have this set of number for example. 12 13 201 243 303 584 674 698 731 745 768 800. So what i wish to do is to extract the largest number in each 100 interval. For example in the range of 0-100, only 13 will be extracted out.

 

Lastly, looping all the data the result should be an array of 13 243 303 584 698 768 800.

 

I tried using a nested loop and a True False case with build array, but i could not get the arrangement i want. Please help me on this Thank you.

 

 

Furthermore, each number on top is accompanied by another number, meanwhile extracting the data i have, i should have the accompanying number on the next column too.

 

Cheers

PX

 

1.png

 

 

0 Kudos
Message 1 of 2
(2,460 Views)
Solution
Accepted by topic author pengxin

This assumes your array is sorted.

 

If you use the quotient remainder function between the current value and the next one in your array and compare the quotients, you'll know whether the next value is in a new hundred, thus making the current value the highest number in the current hundred.

 

Message Edited by Ravens Fan on 03-24-2010 12:52 AM
Message 2 of 2
(2,452 Views)