cumsum4

Details

Cumulatively calculate the fourth powers of the elements in X.

Examples

x=[2,3,4];
cumsum4 x;
// output
[16,97,353]

m=matrix(1 2 3, 4 5 6);
m;
#0 #1
1 4
2 5
3 6
cumsum4(m);
#0 #1
1 256
17 881
98 2177

Related functions: cumsum, cumsum2, cumsum3