# cumsum3 {#cumsum3}

## Syntax {#syntax}

`cumsum3(X)`

Please see [cumFunctions](../Themes/cumFunctions.md) for the parameters and windowing logic.

## Details {#details}

Cumulatively calculate the cubes of squares of the elements in *X*.

## Examples {#examples}

```
x=[2,3,4];
cumsum3 x;
// output: [8,35,99]

m=matrix(1 2 3, 4 5 6);
m;
```

|\#0|\#1|
|---|---|
|1|4|
|2|5|
|3|6|

```
cumsum3(m);
```

|\#0|\#1|
|---|---|
|1|64|
|9|189|
|36|405|

Related functions: [cumsum](cumsum.md), [cumsum2](cumsum2.md), [cumsum4](cumsum4.md)

