フィルターのクリア

get possible combinations for 3 elements but 5 columns

2 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2017 年 3 月 7 日
編集済み: KSSV 2017 年 3 月 7 日
with worker set [1 2 3], i need to get the possible number of allotments we can do for 5 work, that is i need a matrix as below
[1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
1 2 3 1 2
1 2 2 3 3
...
....
..
3 3 3 3 1];
all such combinations.... please can someone help me...

採用された回答

KSSV
KSSV 2017 年 3 月 7 日
編集済み: KSSV 2017 年 3 月 7 日
k = randi(3,1000,5) ;
l = unique(k,'rows') ;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by