I usually use randsample(), but I came across randi(), and I'm wondering if there is any difference?
For example, these seem to be both picking random numbers from [1,10] and returning the 10 x 1 vector
n = randi(10,10,1);
n2 = randi(10,10,true);
What is the difference between these two lines of code?
Aucun commentaire:
Enregistrer un commentaire