Creating a random permutation that always start with a specific value
이전 댓글 표시
Dear all,
I want to create a vector of the size ten that starts with a the value one and the rest must be random. Therefore I wanted to do the following: N = [1 randperm(9)]. However, randperm only returns the values between 1 and 9 in such a case. Is there anyone who knows how this works or knows another function that could help me with my problem.
Kind regards, Thomas
채택된 답변
추가 답변 (1개)
Torsten
2018년 4월 5일
N=[1 1+randperm(9)];
Best wishes
Torsten.
카테고리
도움말 센터 및 File Exchange에서 Triangular Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!