how can I collect all possible combinations of two numbers from a data set in matlab ?
4 views (last 30 days)
I have a matrix, like the one s below:
A=[1 2 4 8 16 32];
I want to collect all the possible cases of chossing two array from the above matrix and then have the sum of these values. like below:
How is it possible to access all the possibe combination of two array from a matrix?
I appreciate your support in advance.