combination problem

5 vues (au cours des 30 derniers jours)
Mohammad Golam Kibria
Mohammad Golam Kibria le 12 Sep 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?

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by