I would like to generate some static weighted random samples using Matlab. I am now using randsample() to achieve weighted random samples, the command is as follows:
P = randsample([1 2 3 4],12,true,[0.15 0.35 0.35 0.15]);
However, P will change every time when I run this command...
Any thoughts on how to make P static? Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire