# Analyze histogramđ

Calculates statistical features from a histogram.

## Inputsđ

`histogram`

: Histogram vector of size 1-by-N.

## Outputsđ

`first`

: The index of the first non-zero value. -1 if all values are zeros, otherwise the value is on range 0âŚN-1.`last`

: The index of the last non-zero value. -1 if all values are zeros, otherwise the value is on range 0âŚN-1.`range`

:*last*-*first*+ 1, or zero if the histogram is all zeros.`sum`

: Sum of all entries in the histogram.`mean`

: Mean of the dataset from which the histogram was calculated.`weightedSum`

: Sum of all entries in the histogram weighted by the index of each entry. Computed as*sum***mean*.`minIndex`

: The index of the minimum value. If there are many indices with the same value, this is the first one.`maxIndex`

: The index of the maximum value. If there are many indices with the same value, this is the first one.`variance`

: Variance of the dataset from which the histogram was calculated.`stdDev`

: Standard deviation of the dataset from which the histogram was calculated. Computed as square root of*variance*.`stdMean`

: Mean deviation of the dataset from which the histogram was calculated. Computed as average of absolute differences to the mean value.`median`

: Median of the dataset from which the histogram was calculated.`skewness`

: Skewness of the dataset from which the histogram was calculated.`kurtosis`

: Kurtosis of the dataset from which the histogram was calculated.`localMinima`

: An M-by-1 matrix of indices with local minima, including the global minimum.`localMaxima`

: An M-by-1 matrix of indices with local maxima, including the global maximum.