random sampling of all possible combinations

2 vues (au cours des 30 derniers jours)
Joel Schelander
Joel Schelander le 14 Avr 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?

Réponses (0)

Catégories

En savoir plus sur Automotive dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by