Integral (rolling, time based)

Signature

Accumulate_Rolling_Integral(expression, window)

Description

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

Note  

The integral assumes that the input signal is step interpolated and includes only the area strictly between first and last sample.

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 integral of expression in the time range given by window.

Arguments

 

expression

The signal for which the integral 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 integral for the last 5 seconds use Accumulate_Rolling_Integral(expression, Master()-5).