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

1 回表示 (過去 30 日間)
How to limit the function nchoosek(0:256,4) values to some fixed number, for example first 500 combinations?

採用された回答

Matt J
Matt J 2015 年 12 月 30 日
編集済み: Matt J 2015 年 12 月 30 日
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,:)),

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by