Borrar filtros
Borrar filtros

get possible combinations for 3 elements but 5 columns

1 visualización (últimos 30 días)
Elysi Cochin
Elysi Cochin el 7 de Mzo. de 2017
Editada: KSSV el 7 de Mzo. de 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...

Respuesta aceptada

KSSV
KSSV el 7 de Mzo. de 2017
Editada: KSSV el 7 de Mzo. de 2017
k = randi(3,1000,5) ;
l = unique(k,'rows') ;

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by