multihistfit(data,nbins,varargin)
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
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.