using gampdf and gamfit
Afficher commentaires plus anciens
I have found values of gamma distribution using
Y = gampdf(1:40,9,0.5)
Now, from the data I have, I want to estimate the parameters A and B with which I generated gamma distribution values. I mean, I want to get values of A and B near to the 9 and 0.5 respectively.
I have used gamfit function like this:
phat = gamfit(Y)
but I get wrong A and B values. Where is the mistake?
Thank you.
Donatas
2 commentaires
Star Strider
le 14 Mar 2014
Consider:
Y = gamrnd(9, .5, 40, 1);
Donatas
le 15 Mar 2014
Réponses (1)
Amr Hashem
le 31 Oct 2015
Modifié(e) : Amr Hashem
le 31 Oct 2015
firstly you have to use:
Y= gamfit(Data) % use Data not Y
then use :
G= gampdf(X,A,B)
plot(X,G)
the parameters depends on your Data, you can't change them
Catégories
En savoir plus sur Gamma Distribution dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!