Search code examples
javascriptpythoncsliding

Calculating sliding averages


I'm not even sure what sliding average is, but someone told me it would help with something I'm working on.

I have a table of random values -- table[n] = random(100) / 100

I need to populate table2 with their sliding averages.

I think this is the terminology. Let me know if it doesn't make sense.


Solution

  • The Moving average entry on Wikipedia might be a good start.