Moving averages
Eduard Kas
Does anyone know a way to calculate moving averages (MA) in Igor? For example for a MA(k) function of order k=10, I would like to calculate first of all the average of the values at point numbers 0 up to and including 9, following that the average of the values at point numbers 1 up to and including 10, etc. Igor's decimation function comes close to what I am looking for. However, in contrast with the decimation alternative in a newly created MA wave I would like to largely maintain the number of points of the orginal wave. Thanks for any help.
Eduard Kas
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
May 6, 2010 at 05:05 pm - Permalink
Eduard
May 7, 2010 at 01:36 pm - Permalink
The description of Box Smoothing is clear to me. However, I have one follow up question. Box Smoothing appears to calculate an equal number before and after the smoothed value. So in case of 25 averages I would expect that the first smoothed value can be calculated at point number 12. However, contrary to my expectation smoothed values are also calculated for the thirst twelve points (that is for points 0 up to and including 11). It seems that in my example for the first twelve points the calculation of the smoothed value is based on a different formula. Is that indeed the case, and if so, what is the formula for these points?
Thanks for any reaction.
Eduard
May 8, 2010 at 02:15 am - Permalink
I believe the answer is in the "End Effects" help subtopic. Execute:
May 8, 2010 at 09:27 pm - Permalink