cumwavg

Syntax

cumwavg(X, Y)

Please see Cumulative Window Functions (cum-functions) for the parameters and windowing logic.

Details

Calculate the cumulative weighted average of X with Y as the weights. The result is a vector of the same length as X. Null values are ignored in the calculation.

Examples

$ cumwavg(2.2 1.1 3.3, 4 5 6);
[2.2,1.588889,2.273333]

$ cumwavg(1 NULL 1, 1 1 1);
[1,1,1]

Related function: wavg