Arranging a vector to new index position
1 回表示 (過去 30 日間)
古いコメントを表示
I have a vector E= [E1, E2.... En]. I have shuffled it's index with randomperm. I want to arrange the vector E according to new index.
0 件のコメント
採用された回答
Dyuman Joshi
2023 年 1 月 25 日
移動済み: Jan
2023 年 1 月 25 日
You mean like this
n=15;
E = randi(50,1,n)
idx = randperm(n)
Eprime = E(idx)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!