Yes, quite elegant, but you have to handle the cases at either end of the series. This can be done by putting guard bands at either end of the series, but the guard bands need to be able to grow & shrink with the size of the moving window. Alternatively, you can grow & shrink the window at either end by putting maxes & mins in a bunch of index calculations, but it's quite tricky to get right. The simple exponential decay-type moving average is (normally) pretty trivial & foolproof to implement. I wasn't able to find any convolution "add-ins" for Calc. At 02:51 PM 2/22/2010, Eugene Salamin wrote:
From: Henry Baker <hbaker1@pipeline.com>
To: math-fun <math-fun@mailman.xmission.com> Sent: Mon, February 22, 2010 11:28:13 AM Subject: [math-fun] Moving averages and net present values
I was hacking a spreadsheet today & wanted to compute a moving average. I wasn't terribly particular about which moving average, but didn't find any moving averages in the list of functions that the spreadsheet program (OpenOffice Calc) offered. ________________________________ In OpenOffice 3.1, I put =SIN(0.1*ROW()) in A1:A200. Then I put =AVERAGE(A1:A11) in B6, and copied it to B7:B195. I made a chart, and got two sinusoids of period about 63, one ranging from -1.0 to 1.0, the other from -0.95 to 0.95. It looks like a moving average.
-- Gene