specified numbers of random permutation of a vector
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Walter Roberson
am 1 Jan. 2019
Duplicates https://www.mathworks.com/matlabcentral/answers/437825-how-could-i-find-specified-number-of-permutation-of-a-vector
Akzeptierte Antwort
Weitere Antworten (3)
madhan ravi
am 1 Jan. 2019
Bearbeitet: madhan ravi
am 1 Jan. 2019
Perhaps random indexing like below?
vector(randperm(100)) % 100 a specified number
0 Kommentare
Siehe auch
Kategorien
Mehr zu Elementary Math finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!