File Exchange

image thumbnail

Histogram with a Laplace Distribution Fit

version 1.3.0.0 (2.29 KB) by Hristo Zhivomirov
Generation of histogram with superimposed fitted Laplace (double exponential) distribution.

10 Downloads

Updated 21 Jun 2020

View Version History

View License

The present code is a Matlab function that provides a generation of histogram with superimposed fitted Laplace (double exponential) distribution, similarly to built-in Matlab function “histfit”.

An example is given in order to clarify the usage of the function. For convenience, the input and output arguments are given in the beginning of the function.

The code is based on the theory described in:

[1] N. Johnson, S. Kotz, N. Balakrishnan. Continuous Univariate Distributions Vol. 2. New York, John Wiley & Sons, 1995.

Cite As

Hristo Zhivomirov (2020). Histogram with a Laplace Distribution Fit (https://www.mathworks.com/matlabcentral/fileexchange/53398-histogram-with-a-laplace-distribution-fit), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Lingyun GUO

Hristo Zhivomirov

Hi Bess001!

Please, send me your code on my e-mail and will give you a detailed information about the proper implementation of my function. I'd be glad to help!

All best,
Hristo

Bess001

Thank you for sharing this program. However, I'm unable to make it run and it displays this error.

Error using xlim (line 31)
Limits must be a 2-element vector of increasing numeric values.

Error in histfitlaplace (line 33)
xlim([mu-1.1*dx mu+1.1*dx]);

Can somebody help me with this issue?

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!