Permutation and combination
이전 댓글 표시
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
답변 (1개)
Jan
2011년 10월 21일
0 개 추천
This FEX submission solves the main part of your porblem:
카테고리
도움말 센터 및 File Exchange에서 Elementary Math에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!