Here's a design challenge for you guys: I have values in three file registers: fileA, fileB, fileC. I want to choose the value that's in the middle (numerically) and put it into W. The brute-force way to do this would be to copy the list, sort the copy in place, and choose the middle value. I'm sure there's a more direct way. Any ideas? (Application: This a simple nonlinear filter to remove occasional outliers in a sampled data stream.) Regards, Mark markrages@gmail -- You think that it is a secret, but it never has been one. - fortune cookie -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist