Hi, Does anyone have any code to implement a median filter for a small number of samples (say 5, 7, 9) that can operate in a "moving/rolling" fashion (i.e. results are available after each new data point using the previous n data points), that operates in a time and space (I know I'm asking for too much here!) efficient way preferably using n (or less!) memory locations for n samples. I've looked around but all of the examples I've seen so far end up changing the order of the data set and so make it hard to discard the oldest item in the set. Note this does not have to be a perfect median filter so an efficient implementation that has similar noise removal properties would also work for me. As always thanks for anything you can do to help! Andy PS A general C or pseudo code algorithm would be fine I can code it up! -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics