how can I collect all possible combinations of two numbers from a data set in matlab ?
3 ビュー (過去 30 日間)
古いコメントを表示
Dear All,
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:
1+2=3;
8+32=40;
2+16=18;
How is it possible to access all the possibe combination of two array from a matrix?
I appreciate your support in advance.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!