combination problem

5 visualizzazioni (ultimi 30 giorni)
Mohammad Golam Kibria
Mohammad Golam Kibria il 12 Set 2011
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?

Risposta accettata

Andrei Bobrov
Andrei Bobrov il 12 Set 2011
It's like?
out = nchoosek(1:4,2)

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by