12-21-2016 03:49 PM
Hi all, I have an array of double data. I want to split this array into three categories: the ones where the floor of the data is less than 40, the ones where the floor is from 40-69, and the ones where the floor is 70 or greater. Then on the middle group I want to further bin the data by each integer, so you get one group that has the floor going to 50, on with the floor at 51, one with the floor at 40, etc.
any idea what that would look like?
Solved! Go to Solution.
12-21-2016 07:50 PM
12-22-2016 09:59 AM
A For loop and Threshold 1D array
Basycally it is hystogram function (number of elements in each group).
I do not know how you want to organize your groups, so it is just counting elements in each group.
12-22-2016 10:04 AM
I ended up doing something very similar:
Never seen Threhold 1D array used before though, thanks for introducing me to it!
12-22-2016 10:45 AM
12-22-2016 10:46 AM
Well I wanted it for every integer in that 40-70 range, which by that method would mean lots of those In Range functions.
12-27-2016 10:30 AM
Could you have just one "In Range" function in a for loop and have the limits increment everytime the loop runs to limit the number of "In Range" functions?
Angela Li
Applications Engineer
12-27-2016 10:44 AM
That's essentially what I ended up doing! See my previous post.