How do I make a World Cup simulator with MATLAB?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Er Le
el 20 de Mayo de 2022
Comentada: Er Le
el 24 de Mayo de 2022
I am currently making a World Cup simulator with matlab
The list below is the groups
How should I write the code to make my simulator work?
- from each group, I want to choose 2 random teams
- the 2 randomly chosen team would qualify to the tounament, which starts from the round of 16
Can someone help me?
A={'Qatar';'Ecuador';'Senegal';'Netherlands'};
B={'England';'IR Iran';'USA';'Euro Play-off'};
C={'Argentina';'Saudi Arabia';'Mexico';'Poland'};
D={'France';'IC Play-off 1';'Denmark';'Tuinisa'};
E={'Spain';'IC Play-off 2';'Germany';'Japan'};
F={'Belgium';'Canada';'Morocco';'Coratia'};
G={'Brazil';'Serbia';'Switzerland';'Cameroon'};
H={'Portugal';'Ghana';'Uruguay';'Korea Republic'};
0 comentarios
Respuesta aceptada
the cyclist
el 20 de Mayo de 2022
rng default
A={'Qatar';'Ecuador';'Senegal';'Netherlands'};
teamRank = randperm(4);
A_advance = A(teamRank(1:2))
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!