combination problem

4 visualizaciones (últimos 30 días)
Mohammad Golam Kibria
Mohammad Golam Kibria el 12 de Sept. de 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?

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 12 de Sept. de 2011
It's like?
out = nchoosek(1:4,2)

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by