how to find subsets

Hi, if we have a set A={1,2,3,4,5,6} how can we find its subsets with four and five elements.

Respuestas (2)

Mischa Kim
Mischa Kim el 2 de Jun. de 2014
Editada: Mischa Kim el 2 de Jun. de 2014

1 voto

Hello, use nchoosek
A = [1,2,3,4,5,6];
subsA = nchoosek(A,4)
for four elements, for example.
math search
math search el 2 de Jun. de 2014

0 votos

Thank you for the reply.

Categorías

Más información sobre Discrete Math en Centro de ayuda y File Exchange.

Preguntada:

el 2 de Jun. de 2014

Respondida:

el 2 de Jun. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by