"Smooths" a series or table by averaging around each point.
MOVAVG(series, N, rampflag)
series |
- |
A series or table. |
||||
N |
- |
An integer, the number of points to average as the series is processed. |
||||
rampflag |
- |
Optional. An integer, endpoint averaging flag.
|
A series or table.
movavg({4, 3, 2, 1, 2, 3, 4}, 3)
returns the series {4.0, 3.5, 3, 2, 1.67, 2, 3, 3.5, 4}.
movavg({4, 3, 2, 1, 2, 3, 4}, 3, 0)
returns the series {1.33, 2.33, 3.0, 2.0, 1.67, 2, 3, 2.33}
In particular, for series x of length N, movavg(x, 3) returns the following N+2 length series:
If rampflag is 0, movavg(x, 3, 0) returns the following N+2 length series:
MOVAVG operates on Real and Complex series. The output series is longer than original one by the number of points averaged minus 1. This causes a phase shift in the screen display.
MOVAVG pads the series with zeros at the beginning and end before computing the average. MOVAVG2 does not pad in such a way.
See LINAVG to compute a moving average with zero phase shift.
See EXPMOVAVG to compute the exponential moving average.
See BLOCKAVG to compute a non-overlapping moving average.