how to randomize the column position of a matrix?
1 回表示 (過去 30 日間)
古いコメントを表示
suppose A=[D G H K ... O];
i want to do C=[H D O .... G.. K]
i also want to keep the information about the order of randomization to use it other matrix further manipulation.
0 件のコメント
採用された回答
Dishant Arora
2012 年 9 月 9 日
ind=randperm(size(A,2));
C=zeros(size(A));
C=A(:,ind);
ind preserves the order of randomization.
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!