combination problem

5 ビュー (過去 30 日間)
Mohammad Golam Kibria
Mohammad Golam Kibria 2011 年 9 月 12 日
Hi suppose I have some values 1 2 3 4.
I want to find all possible combination of these four, taking only two distinct element at a time and store it in a matrix. Is there any one to help me?

採用された回答

Andrei Bobrov
Andrei Bobrov 2011 年 9 月 12 日
It's like?
out = nchoosek(1:4,2)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by