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 个评论
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