Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- decompose[p1_, p2_] :=
- Module[{x1 = p1, x2 = p2},
- If[x1 <= x2,
- Sum[Print[k1, x2 - x1 + 2 k2, k1], {k1, 0, x1}, {k2, 0, x1 - k1}],
- Print["Wrong values for the p1 and the p2"]]]
- decompose[2, 2]
- 6 Null
- There are 6 channels
- 000
- 020
- 040
- 101
- 121
- 202
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement