vendredi 15 avril 2016

MATLAB random numbers below a threshold

I use normrnd and lognormrnd to sample numbers according to these two distribution functions. Nevertheless, since I am using quite large standard deviations, I sample several numbers that are above a threshold I put for my code. My question is: is there a way to sample numbers according to this distributions but within a certain threshold without using an if_bigger --> sample_again function?




Aucun commentaire:

Enregistrer un commentaire