resampling to avoid limit - nchoosek
Mostrar comentarios más antiguos
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 comentario
Sounds like you need to use randperm.
To choose 1000 unique random samples from values 1:429,
randperm(429, 1000)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matched Filter and Ambiguity Function en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!