[Haskell-beginners] Simple Moving Average of a list of real numbers

Kim-Ee Yeoh ky3 at atamo.com
Tue Nov 26 17:54:27 UTC 2013


On Wed, Nov 27, 2013 at 12:11 AM, Michael Orlitzky <michael at orlitzky.com>wrote:

> Inline below is some code that uses this idea along with a "scan"
> (similar to a fold) to accomplish the moving average.
>

Hi Michael,

When I read OP's request, I understood it as what Ozgur had interpreted,
i.e. last N items for a /constant/ N, also known as a moving window average.

Your running average solution is interesting too!

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20131127/6c67d362/attachment.html>


More information about the Beginners mailing list