vendredi 1 mai 2020

Matlab: custom distribution of random numbers

I have a set of random numbers

randi([1 100],1,50) % numbers from 1 to 100 in a 1x50 array.

I want them to have a 1/x^2 distribution. I couldn't find a direct command to do that. I read about pdf functions but I'm not that familiar with matlab.

Any ideas?




Aucun commentaire:

Enregistrer un commentaire