Effacer les filtres
Effacer les filtres

How to fit multiple curves to histogram subpopulations?

19 vues (au cours des 30 derniers jours)
Matthew ODonohue
Matthew ODonohue le 10 Fév 2022
Modifié(e) : AndresVar le 11 Fév 2022
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.

Réponses (1)

AndresVar
AndresVar le 11 Fév 2022
Modifié(e) : AndresVar le 11 Fév 2022
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

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by