resampling to avoid limit - nchoosek
Show older comments
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 Comment
Sounds like you need to use randperm.
To choose 1000 unique random samples from values 1:429,
randperm(429, 1000)
Accepted Answer
More Answers (0)
Categories
Find more on Matched Filter and Ambiguity Function in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!