specified numbers of random permutation of a vector
9 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Walter Roberson
2019 年 1 月 1 日
Duplicates https://www.mathworks.com/matlabcentral/answers/437825-how-could-i-find-specified-number-of-permutation-of-a-vector
採用された回答
その他の回答 (3 件)
madhan ravi
2019 年 1 月 1 日
編集済み: madhan ravi
2019 年 1 月 1 日
Perhaps random indexing like below?
vector(randperm(100)) % 100 a specified number
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!