How to create a equally distributed batting order for little league baseball team
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (2)
Use randperm() to generate the orders, e.g.:
ORDER = randperm(10,10)
1 Kommentar
Jason Burke
am 5 Nov. 2021
Sulaymon Eshkabilov
am 5 Nov. 2021
Bearbeitet: Sulaymon Eshkabilov
am 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 Kommentar
Jason Burke
am 5 Nov. 2021
Bearbeitet: Jason Burke
am 5 Nov. 2021
Kategorien
Mehr zu Just for fun finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!