Hello there,

I would like to solve the following problem with Matlab.

If you choose two numbers out of this vector [-1 -1 -1 1], what is their sum, on average?

With nchoosek(4,2) I can determine that there are 6 combinations, but how can I iterate through these combinations to determine each of the 6 sums?

Thanks,

Tobias

## Best Answer