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!