resampling to avoid limit - nchoosek
Afficher commentaires plus anciens
I am investigating the combination of vehicles and houses.
My equation for this is:
i=nchoosek(1:numel(VID1),size(Hcombos,2));
Where VID1 is a cell containing all the possible combinations of vechicles for one house and size(Hcombos2,2) is the number of households.
My problem is that I have 429 vehicles and 36 households. I need to limit the number of combinations I generate: when I combine 429 vehicles with 36 houses, I should get out 1000 (arbitrary) of those combinations. .
1 commentaire
Sounds like you need to use randperm.
To choose 1000 unique random samples from values 1:429,
randperm(429, 1000)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matched Filter and Ambiguity Function dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!