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 CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by