Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!csccat!ncmicro!chris From: chris@ncmicro.lonestar.org (Chris Arps) Newsgroups: comp.dsp Subject: Re: Creating Samples by stuffing & filtering Keywords: smooth data weighted Message-ID: <220@ncmicro.lonestar.org> Date: 7 Nov 90 17:00:11 GMT References: <16311@netcom.UUCP> <8563@pasteur.Berkeley.EDU> Organization: NC Microproducts, Inc. Richardson, Tx Lines: 17 I did some real-time data smoothing of an oil well tool that measured resistance. What we did was to place the samples into a queue that was a nice number for a bell curve average. We just used a simple arrray that was either 9 or 27 elements long giving low and high amounts of smoothing. The array was used as a queue by filling it up with the first 9 data values, multiplying a pre-set array of bell curve values (which all add up to 1.0) to each value and adding to a result giving a weighted average value which is output to the strip recorder. When the next data word comes in, just move all the array elements upi one postion in the array and add the new data sample to the end of the array. This algorithm works well and on machines with block memory move, the queue work fast enough for real-time computation. I hope that this is good enough description of the algorithm. It produced nice curves and can be extended as low as 3 elments or as high as you need.