How to fit multiple curves to histogram subpopulations?
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
AndresVar
el 11 de Feb. de 2022
Editada: AndresVar
el 11 de Feb. de 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
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!