getDensity(x, Bins)

Compute distribution as density
Updated 15 May 2017

View License

Compute density distribution of the values in 'x'.
To check the result: plot(pBins, PDD), xlabel('x'), ylabel('Density')


x : vector of values
Bins : Optional: bins used to compute the density. if Bins is not given in the call, the function
will use the default binning, given by: Bins = linspace(min(x), max(x), round(sqrt(length(x))))


PDD : Probability Density Distribution. [ sum(PDD) == 1 ]
pBins : Return the value of the bins used to compute the distribution

Cite As

Ruggero G. Bettinardi (2024). getDensity(x, Bins) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes