how to fix a sequence generated using randperm
2 ビュー (過去 30 日間)
古いコメントを表示
I am trying to generate a sequence of numbers using randperm, is there a way I can fix the sequence generated like for example we can use rng for randi.
0 件のコメント
採用された回答
Walter Roberson
2018 年 6 月 2 日
randperm() uses rand() internally, so rng() will work.
3 件のコメント
Walter Roberson
2018 年 6 月 2 日
>> rng(55)
>> randperm(18,5)
ans =
14 1 4 15 7
>> rng(55)
>> randperm(18,5)
ans =
14 1 4 15 7
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!