Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Histogram based on empirical cumulative distribution function

```
[n,c] =
ecdfhist(f,x)
```

```
[n,c] =
ecdfhist(f,x,m)
```

`n = ecdfhist(f,x,centers)`

`ecdfhist(___)`

`[`

returns
the heights, `n`

,`c`

] =
ecdfhist(`f`

,`x`

)`n`

, of histogram bars for 10 equally
spaced bins and the position of the bin centers, `c`

.

`ecdfhist`

computes the bar heights from the
increases in the empirical cumulative distribution function, `f`

,
at evaluation points, `x`

. It normalizes the bar
heights so that the area of the histogram is equal to 1. In contrast, `histogram`

produces bars with heights
representing bin counts.

`ecdfhist(___)`

plots the histogram
bars.