random sampling of all possible combinations

1 回表示 (過去 30 日間)
Joel Schelander
Joel Schelander 2021 年 4 月 14 日
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 Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by