how to generate a pattern
3 ビュー (過去 30 日間)
古いコメントを表示
I would like to generate all the possible combinations
for example:
[1 2 3 4 5]
I want to generate a reordered version of the original:
[2 3 4 5 1;
3 4 5 1 2;
4 5 1 2 3;
5 1 2 3 4]
how should i do that?
0 件のコメント
回答 (1 件)
Star Strider
2014 年 8 月 23 日
If you have the Statistics Toolbox, use the combnk function. Otherwise, use Matt Fig’s File Exchange contribution combinator.
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!