samedi 4 juin 2016

in matlab generate n random numbers between 0 and 1 that sum of them is less equal than one

I want to generate n random numbers between 0 and 1 that sum of them is less equal than one. Sum(n random number between 0 and 1) <= 1 n? For example: 3 random number between 0 and 1: 0.2 , 0.3 , 0.4 0.2 + 0.3 + 0.4 = 0.9 <=1




Aucun commentaire:

Enregistrer un commentaire