Hi all,
I have a set of records containing numbers between 0 and 1. A value somewhere between 0 and 1 shall be found that divides these records into groups, whose sizes I then calculate. I'd also like to output and know the dividing value that produced these group sizes.
I imagine that this dividing value might be found by some sort of macro, presumably a batch or iterative macro. Which sort is appropriate?
As an example we might have
0.1
0.8
0.27
0.28
as our input records.
With a threshold of 0.275, we would divide the records into two groups, each of size 2. The output might then look like [original input | greater than threshold | threshold]:
0.1 0 0.275
0.8 1 0.275
0.27 0 0.275
0.28 1 0.275
How can I scan over all dividing threshold values between 0 and 1, say in steps of 0.001? I am unclear on how to best do this? The dividing value is need as an output also.
Thx much -