Randomly select a column
显示 更早的评论
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)))
Md Nazmul Hoque
2022-6-5
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 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!