Skip to contents

Equal-width histogram of x with n_bins bins. Returns counts, bin centres, probabilities, and edges (parallel to numpy.histogram).

Usage

morie_dsp_amplitude_histogram(x, n_bins = 50L)

Arguments

x

Numeric vector.

n_bins

Number of bins. Default 50.

Value

List with counts, centers, probabilities, edges.

References

Rangayyan & Krishnan (2015), Ch. 5, sec. 5.6.

Examples

set.seed(1)
x <- rnorm(200)
h <- morie_dsp_amplitude_histogram(x, n_bins = 10L)
h$counts
#>  [1]  4 11 17 36 45 30 27 17  6  7