Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
How to limit the function nchoosek(0:256,4) values to some fixed number, for example first 500 combinations?

Réponse acceptée

Matt J
Matt J le 30 Déc 2015
Modifié(e) : Matt J le 30 Déc 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,:)),

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by