specified numbers of random permutation of a vector
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Walter Roberson
il 1 Gen 2019
Duplicates https://www.mathworks.com/matlabcentral/answers/437825-how-could-i-find-specified-number-of-permutation-of-a-vector
Risposta accettata
Più risposte (3)
madhan ravi
il 1 Gen 2019
Modificato: madhan ravi
il 1 Gen 2019
Perhaps random indexing like below?
vector(randperm(100)) % 100 a specified number
0 Commenti
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!