Permutation and combination
Mostrar comentarios más antiguos
Hi all, I am trying to solve a problem. I need a matlab code which automatically calculates the possible number of combinations of dividing a number or constant to eg 3 objects using a defined step.
eg to divide 60 to A, B, C using step size 60. Possibilities will be [60 0 0; 0 60 0; 0 0 60] --> 3 possible combinations
120 using step 60, will be [120 0 0; 0 120 0; 0 0 120; 60 60 0; 60 0 60; 0 60 60] --> 6 possible combinations ... and so on
Can anyone help me with a matlab code which computes these possible number of combinations? I will be very grateful. Hummy
Respuestas (1)
Jan
el 21 de Oct. de 2011
0 votos
This FEX submission solves the main part of your porblem:
Categorías
Más información sobre Elementary Math en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!