random sampling of all possible combinations

1 Ansicht (letzte 30 Tage)
Joel Schelander
Joel Schelander am 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?

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by