フィルターのクリア

How to fit multiple curves to histogram subpopulations?

25 ビュー (過去 30 日間)
Matthew ODonohue
Matthew ODonohue 2022 年 2 月 10 日
編集済み: AndresVar 2022 年 2 月 11 日
Hello, I will be as succint as possible. I have a histogram and would like to fit two seperate curves to the distribution, representing the two subpopulations in the distribution. Essentially I would like to do this (red lines I drew):
How can I do this?
Note that these arent two seperate histograms, but rather a single histogram.
My code for this histogram is here:
%%
figure;
d1=histogram(dG_TfR_100, [0: .3: 25], 'Normalization' ,'probability'); %range of current drops
ylabel('normalized event count')
I have also attached the variable dG_TfR_100 as an excel sheet in case it is needed.
Please let me know if there is any additional information you need. Thank you.

回答 (1 件)

AndresVar
AndresVar 2022 年 2 月 11 日
編集済み: AndresVar 2022 年 2 月 11 日
You could fit a distribution to the histrogram using histfit or fitdist, then identify the number of modes or peaks, N. Then fit the distribution with the sum of N distributions, with carefully selected parameters:
Curve Fitting - MATLAB & Simulink (mathworks.com) to fit your choice of components
You can try this method that fits gaussian mixture model, it works like a k-means clustering:
Browse file exchange for helpful functions:
Here is a gaussian decomposition paper

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by