Histogram fitting Probability Density, Counts, Frequency

버전 1.3.0.0 (5.1 KB) 작성자: Nathan Orloff
A cleaned up version of histfit that outputs data
다운로드 수: 1.2K
업데이트 날짜: 2014/6/2

라이선스 보기

I modified histfit to output the fit results. I haven't reinvented the wheel here. I just took histfit and fixed it. The usage is the same. I also made it so that it automatically computes the interquartile range (http://en.wikipedia.org/wiki/Interquartile_range) for each fit. You can also specify the bins if you want. And now you can toggle between plot types: 'pdf', a curve with area 1; 'counts', number of counts; 'percent', put it in frequency.
If you have data that you want to fit to a histogram then use this function. Your data is a vector "data", then plot type. Chose from any of the viable options for the fit. And then the last input sets the plot type.
The output is the handles of the figure, the probability fit object with all the inherited properties, and xydata which is the x and y data to make the bar graph.

Here is an example.
[h,fitobject,xydata] = histfit2(xx,nbins,'lognormal','counts');

Use Freedman-Diaconis rule and plot as counts:
[h,fitobject,xydata] = histfit2(xx,[],'lognormal','percent');

It makes a pretty green bar graph. Have fun.

인용 양식

Nathan Orloff (2024). Histogram fitting Probability Density, Counts, Frequency (https://www.mathworks.com/matlabcentral/fileexchange/45239-histogram-fitting-probability-density-counts-frequency), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2013b
모든 릴리스와 호환
플랫폼 호환성
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.3.0.0

change title

1.2.0.0

added plot functionality

1.1.0.0

Added plot options and Freedman-Diaconis rule option.

1.0.0.0