Effacer les filtres
Effacer les filtres

get possible combinations for 3 elements but 5 columns

2 vues (au cours des 30 derniers jours)
Elysi Cochin
Elysi Cochin le 7 Mar 2017
Modifié(e) : KSSV le 7 Mar 2017
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...

Réponse acceptée

KSSV
KSSV le 7 Mar 2017
Modifié(e) : KSSV le 7 Mar 2017
k = randi(3,1000,5) ;
l = unique(k,'rows') ;

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by