Note: This page has been translated by MathWorks. Please click here

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

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

Histogram of input or sequence of inputs

**Library:**DSP System Toolbox / Statistics

The Histogram block computes the frequency distribution
of the input elements along each column or along the entire input.
You can specify the dimension using the **Find the histogram
over** parameter. The block distributes the input elements
based on their value into a number of discrete bins, which you specify
through the **Number of bins** parameter. Specify
the highest input value that the histogram can bin through the **Upper
limit of histogram** parameter, * B_{M}*.
Specify the lowest value through the

$$\Delta =\frac{{B}_{M}-{B}_{m}}{n}$$

Each bin is centered at the following location:

$${B}_{m}+\left(k+\frac{1}{2}\right)\Delta \begin{array}{cccc}& & & k=0,1,2,\mathrm{...},n-1\end{array}$$

When the input data is real, the bin boundaries are cast into the double data type. When the input data is complex, bin boundaries for double-precision inputs are cast into the data type double and bin boundaries for integer inputs are cast into data type double and squared.

To track the frequency distribution of inputs over a period
of time, select the **Running histogram** parameter.

When the input is complex, the block sorts the elements according to their magnitude.

Was this topic helpful?