Borrar filtros
Borrar filtros

How to limit the function nchoosek(0:256,4) values to some fixed number, for example first 500 combinations?

2 visualizaciones (últimos 30 días)
How to limit the function nchoosek(0:256,4) values to some fixed number, for example first 500 combinations?

Respuesta aceptada

Matt J
Matt J el 30 de Dic. de 2015
Editada: Matt J el 30 de Dic. de 2015
Something like this, perhaps
n=4;
while nchoosek(n,4)<500
n=n+1;
end
idx=nchoosek(1:n,4);
list=0:256;
result=list(idx(1:500,:)),

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices 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