specified numbers of random permutation of a vector
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
randperm(n) returns a row vector containing a random permutation of the integers from 1 to n inclusive but I need random permutation of the integers from a vector, also I don't need all off them just specified number e.g. 100.
1 commentaire
Walter Roberson
le 1 Jan 2019
Duplicates https://www.mathworks.com/matlabcentral/answers/437825-how-could-i-find-specified-number-of-permutation-of-a-vector
Réponse acceptée
Plus de réponses (3)
madhan ravi
le 1 Jan 2019
Modifié(e) : madhan ravi
le 1 Jan 2019
Perhaps random indexing like below?
vector(randperm(100)) % 100 a specified number
0 commentaires
Voir également
Catégories
En savoir plus sur Elementary Math dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!