random sampling of all possible combinations

1 次查看(过去 30 天)
Hi
I am investigating the combination of vehicles and houses. House 1 can have one or two vehicles, House 2 can only have one.
I have created cells (VID1 and VID2) that contains all possible combination of vehicle(s) a house can have. Now I combine the houhses like this
i=nchoosek(1:numel(VID1),2); %all possible combinations
Now when I am testing I only have three vehicles, but later I will have up to 429 vehicles and 36 households. So I need to limit this function somehow.
e.g. if I have 100 vehicles then this would be
i=nchoosek(1:10000,2)
How do I limit the number of combinations and how can I decide how many combinations is reasonable?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by