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!