multihistfit(data,n​bins,varargin)

Fit multiple distributions in one figure to a dataset
565 Descargas
Actualizado 25 nov 2014

Ver licencia

This small function is just an extend of MATLABs histfit() function, which fits one distribution of choice to a dataset. But sometimes its more usefull to see how different distribution fit to your data in one figure and to compare them visually. For this purpose i wrote this extended histfit function called multiplehistfit, which works quite similar to the original one.
You just have to specifiy the distributions which you would like to fit to your data set on after another in the function call.
For example
%create histogram with fitted normal, logn, weibull and logistic distribution
h = multihistfit(data,50,'norm','logn','weibull','logistic');
I also extended the function to a second Y-Axis showing the probability density.

(I wrote the function in MATLAB 2013a but i am pretty sure it will work for previous versions)

Citar como

Frederik Kratzert (2024). multihistfit(data,nbins,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/48365-multihistfit-data-nbins-varargin), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2013a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Histograms en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

25.11.2015: Fixed the issue, that for large datasets with small probability values the left y-axis only shows 0.0000

1.0.0.0