Sum (rolling, time based)

Signature

Accumulate_Rolling_Add(expression, window)

Description

Applies a moving window to the signal expression and calculates the sum over each window. Each sample of 'result' contains the sum over all samples in the window ending at that time.

Note  

A moving window is defined by a signal: Each sample of the signal represents a window. The value of the sample is the starting point of the window, the time of the sample is the end point of the window. A window defined this way contains all samples where the time t fulfills the condition start < t < end. Windows are usually created by using one of the window creation functions (Window_Sample, Window_Time, Window_Signal_*, ...). Windows can be fed to window evaluation function (Accumulate_Rolling_*).

Result

The sum of expression in the time range given by window.

Arguments

 

expression

The signal for which the sum is calculated.

window

A window signal which defines the start time of the time range (moving window). The end time is defined by the current time. E.g. to calculate the sum for the last 5 seconds use Accumulate_Rolling_Add(expression, Master()-5).