How to create a equally distributed batting order for little league baseball team
Afficher commentaires plus anciens
I am trying to create a batting order for my little league team. I have 10 players. I am trying to create a batting order for the ten games where everyone will bat from 1 to 10 in the order. I have one solution where I just move everyone down one spot from the order in the first game, but I am trying to find a way to do this where the kids are not always following the same kids. Mixing it up where they are following different people.
Réponse acceptée
Plus de réponses (2)
Use randperm() to generate the orders, e.g.:
ORDER = randperm(10,10)
1 commentaire
Jason Burke
le 5 Nov 2021
Sulaymon Eshkabilov
le 5 Nov 2021
Modifié(e) : Sulaymon Eshkabilov
le 5 Nov 2021
Here is how it can be generated for 10 times within a loop:
for ii=1:10
A(ii,:) =randperm(10, 10);
end
1 commentaire
Jason Burke
le 5 Nov 2021
Modifié(e) : Jason Burke
le 5 Nov 2021
Catégories
En savoir plus sur Programming 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!