March Madness Algorithm
by
Nathan Lorah
15 Mar 2013
Need help deciding who will win this year in the tournament? This algorithm will help with that.

MarchMadness2Algorithm.m 
% March Madness Algorithm
% Nathan Lorah
% how do their win percentages compare
gw = input('How many wins does your team have>');
gl = input('How many losses does your team have>');
oppgw = input('How many wins does the other team have>');
oppgl = input('How many losses does the other team have>');
wp = gw/gl;
oppwp = oppgw/oppgl;
wpd = 50*(wp  oppwp);
% What do they look like face to face
ftfq = menu('Has the team beat the team its facing now?','Yes, on home court','They lost on home court','They won at the opponents court','They lost at the opponents court','They did not play');
% Can change numbers here whether you think past games are important
if ftfq == 1
ftf = 10;
elseif ftfq == 2
ftf = 20;
elseif ftfq == 3
ftf = 20;
elseif ftfq == 4
ftf = 10;
else
ftf = 0;
end
% Statistical Differences
% can be changed
% rebounds
reb = input('what is their average number of rebounds per game>');
oppreb = input('what is the opponents average number of rebounds per game>');
rebdiff = reb  oppreb;
% assists
ass = input('What is their average number of assists per game>');
oppass = input('what is the opponents average number of assists per game>');
assdiff = ass  oppass;
% points per game
ppg = input('what is their average number of points per game>');
oppppg = input('What is the opponents average number of rebounds per game>');
ppgdiff = ppg  oppppg;
% feild goal percentage
fgp = input('what is their average feild goal percentage this season>');
oppfgp = input('what is the opponents avarage feild goal percentage this season>');
fgpdiff = 100*(fgp  oppfgp);
% algorithm
Winning_Points = wpd + ftf + rebdiff + ppgdiff + assdiff + fgpdiff


Contact us