jeudi 24 janvier 2019

How can i randomly sample from a distribution already fitted with allfitdist in MATLAB?

I 've found the best fitting of a variable distribution (D(:,2)) using the function "allfitdist". Now i want to save this result in a structure and then i want to randomly sample 10000 times from this result. I'm using this code:

[Ddg2 PDdg2] = allfitdist(D(:,2),'cdf')
My(2).result = PDdg2{1,1} %generalized pareto
output = random(My(2).result,10000)

Something is weard because in the output i get a really big matrix. Maybe i'm wrong in the third raw of the code, when i randomly sample from this distribution. Someone can help me?




Aucun commentaire:

Enregistrer un commentaire