App Designer help with code
Mostrar comentarios más antiguos
I am attempting to make a march madness calculator using Matlab app designer as my final project in school and I am not succeeding in this task. I have multiple criteria for each team like defense, offense, coaching, etc..
each criteria is broken into 4 sections, for example offense, if a team scores 50-60 points per game on average they will be given a value of 1 for offense, if 61-70 a value of two and so on through 90.
then each criteria will be added for both teams and whichever team has the higher "score" wins
global x
if app.Seed1.Value==1-4
x=4;
elseif app.Seed1.Value==5-8
x=3;
elseif app.Seed1.Value==9-12
x=2;
elseif app.Seed1.Value==13-16
x=1;
end
I need this value of x to be able to be included in the final team's score calculation as well as the other criteria end values.
1 comentario
Geoff Hayes
el 17 de Abr. de 2019
Michael - what is the intent of the line (and similar)
if app.Seed1.Value==1-4
Are you trying to say instead
if app.Seed1.Value >= 1 && app.Seed1.Value <= 4
x = 4;
end
where [1,4] is an interval. Also, it isn't clear to me where the above code resides but I suspect that you can avoid using a global variable to store the x value.
Respuestas (0)
Categorías
Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!