Given a=[1 2 3 4 5], generate m=[2 1 3 4 5; 2 3 1 4 5; 2 3 4 1 5; 2 3 4 5 1; 1 3 2 4 5; 1 3 4 2 5; 1 3 4 5 2; 1 2 4 3 5; 1 2 4 5 3; 1 2 3 5 4].
28 ビュー (過去 30 日間)
古いコメントを表示
Given a=[1 2 3 4 5], generate
m=[2 1 3 4 5;
2 3 1 4 5;
2 3 4 1 5;
2 3 4 5 1;
1 3 2 4 5;
1 3 4 2 5;
1 3 4 5 2;
1 2 4 3 5;
1 2 4 5 3;
1 2 3 5 4].
What will be the Matlab code to generate 'm' from 'a'?
2 件のコメント
Jan
2015 年 10 月 18 日
Please explain the relation between the input and the output. Why are these 10 permutations chosen, and not the other ones?
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!