MOVAVG2

Purpose:

Performs a moving average with end point padding.

Syntax:

MOVAVG2(series, N)

series

-

A series or table.

N

-

An integer, the number of points to average as the series is processed.

Returns:

A series.

Example:

W1: 1..10

W2: movavg(W1, 3)

W3: movavg2(W1, 3)

 

W2 contains the series:

 

{1.0,1.5,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,9.5,10.0}

 

and W3 contains the series:

 

{1.333,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,9.667}

 

The standard moving average ramps the average up and down at the end points, whereas MOVAVG2 pads the endpoints.

Remarks:

MOVAVG2 is an adjusted moving average. The standard MOVAVG function performs a "stepped up" average at the start of the series and a "stepped down" average at the end. MOVAVG2 pads the end points with the initial and final values before calculating the moving average.

 

For an N point series, MOVAVG2 returns an N point result.

See Also:

BLOCKAVG

LINAVG

MOVAVG