resampling to avoid limit - nchoosek
古いコメントを表示
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 件のコメント
Sounds like you need to use randperm.
To choose 1000 unique random samples from values 1:429,
randperm(429, 1000)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matched Filter and Ambiguity Function についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!