Randomly select a column

조회 수: 10 (최근 30일)
Md Nazmul Hoque
Md Nazmul Hoque 2022년 6월 4일
댓글: Md Nazmul Hoque 2022년 6월 5일
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
Md Nazmul Hoque
Md Nazmul Hoque 2022년 6월 5일
sorry for that bro, i'm kinda new.
i wanted the specific solution.
in the last one , i thought i couldn't explain it properly
thats why. anyway thank you for your support.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2022년 6월 4일
편집: Matt J 2022년 6월 4일
x=n(:,randperm(100,20))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by