combnk
Return all combinations of k elements in data.
Source Code: combnk
c = combnk (1:5, 2);
disp ("All pairs of integers between 1 and 5:");
disp (c);
All pairs of integers between 1 and 5:
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 4
3 5
4 5
|