I intend to generate a combination of all possible values whose sum equal 10. Few such combination are produced manually here from the example data
and so on.......
Example data:
Is there anyway to go about this programmatically and list such all combination who value equal another value (in this case 10).
Thank you in advance.
Code:
(1,2,3,4),(1,9),(2,8),(3,7),(4,6),(1,3,6)
Example data:
Code:
clear input long var1 1 2 3 4 5 6 7 8 9 10 11 12 13 1 14 15 16 17 18 19 10 end
Is there anyway to go about this programmatically and list such all combination who value equal another value (in this case 10).
Thank you in advance.

Comment