cumavg
Syntax
cumavg(X)
Please see Cumulative Window Functions for the parameter description and windowing logic.
Details
Calculate the cumulative average of X.
Examples
x=[2,3,NULL,4];
cumavg(x);
// output: [2,2.5,2.5,3]
m=matrix(1 2 3 NULL 4, 5 6 NULL 7 8);
m;
| #0 | #1 |
|---|---|
| 1 | 5 |
| 2 | 6 |
| 3 | |
| 7 | |
| 4 | 8 |
cumavg(m);
| #0 | #1 |
|---|---|
| 1 | 5 |
| 1.5 | 5.5 |
| 2 | 5.5 |
| 2 | 6 |
| 2.5 | 6.5 |
Related functions: cummax, cummin, cumprod, cumPositiveStreak, cumsum
