multihistfit(data,n​bins,varargin)

Fit multiple distributions in one figure to a dataset
565.0 次下载
更新时间 2014/11/25

查看许可证

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)

引用格式

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

MATLAB 版本兼容性
创建方式 R2013a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Histograms 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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