# cummed {#cummed}

## Syntax {#syntax}

`cummed(X)`

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

## Details {#details}

Calculate the cumulative median of *X*.

## Examples {#examples}

```
x = [7,9,5,NULL,9]
cummed(x);
// output: [7,8,7,7,8]

m = matrix(6 5 7 8 1, 3 9 4 2 10);
m;
```

|\#0|\#1|
|---|---|
|6|3|
|5|9|
|7|4|
|8|2|
|1|10|

```
cummed(m);
```

|\#0|\#1|
|---|---|
|6|3|
|5.5|6|
|6|4|
|6.5|3.5|
|6|4|

Related functions: [cummax](cummax.md), [cummin](cummin.md), [med](../m/med.md)

