# cumsum4 {#cumsum4}

## Syntax {#syntax}

`cumsum4(X)`

Please see [Cumulative Window Functions](../Themes/cumFunctions.md) for the parameter description and windowing logic.

## Details {#details}

Cumulatively calculate the fourth powers of the elements in *X*.

## Examples {#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](cumsum.md), [cumsum2](cumsum2.md), [cumsum3](cumsum3.md)

