How to access parameters in histfit
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am using histfit to fit gamma distribution in data.
histfit(data,'distribution,'gamma');
Now I want to retrieve parameters of fitted Gamma. How to do that??
0 commentaires
Réponses (2)
Paulo Silva
le 2 Août 2011
I don't understand exactly what you want, maybe getting the coordinates of the curve?
r = normrnd(10,1,100,1);
hf=histfit(r);
h = get(gca,'Children');
set(h(2),'FaceColor',[.8 .8 1])
get(hf(1)) %properties of the histogram
get(hf(2)) %properties of the normal curve
%you can retrieve and plot the curve
figure
x=get(hf(2),'XData');
y=get(hf(2),'YData');
plot(x,y)
0 commentaires
Pieter De Wet
le 21 Jan 2019
Modifié(e) : Pieter De Wet
le 21 Jan 2019
histfit works with fitdist function. See the fitdist documentation, giving:
pd = fitdist(r,'Normal')
pd =
NormalDistribution
Normal distribution
mu = 10.1231 [9.89244, 10.3537]
sigma = 1.1624 [1.02059, 1.35033]
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!