03-01-2007 10:50 AM
03-01-2007 11:13 AM
03-01-2007 11:16 AM
I like it.
Simple solution.
03-01-2007 11:54 AM - edited 03-01-2007 11:54 AM
Another easy possibility is the use of "threshold array" with a sorted array of "boundary locations" (see image).
Be aware that if you are very close to a boundary, the normal precautions for comparing DBLs apply.
(You can easily modify the desired behavior by rounding up or down. Also be aware that anything outside the range will be stuffed into the closest border range. The code in the image creates four ranges: 2.5 and below, 2.5..8, 8..10, >10. Modify as needed)
Message Edited by altenbach on 03-01-2007 09:56 AM