random sampling of all possible combinations

1 visualizzazione (ultimi 30 giorni)
Joel Schelander
Joel Schelander il 14 Apr 2021
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?

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by