Randomly select a column
조회 수: 10 (최근 30일)
이전 댓글 표시
n= 3*100 matrix
i want to select 20 non repeating random column
so, final matrix will be
x=3*20 ;
where 3 rows should be the corresponding column value of the original matrix
Any help would be really appreciated.
Thanks
댓글 수: 2
Torsten
2022년 6월 4일
Why do you ask the same question again ?
Here is (again) the answer:
x=n(:,sort(randperm(100,20)))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!