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 CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by