Originally Posted by

**adam_leeds** Basically I have all the results from last season in excel.

And i want to work out the upsets.

So i need to somehow input the results into matlab which will put the results in match by match, whilst also comparing if a team with lower points beat the one it played.

Thanks Adam

My rubbish attempt with loads of errors:

footballLeagueTables('HomeTeam','AwayTeam',x,y)

a=[x];

b = [y];

for a = 1:1:n && b = 1:1:n

if a > b

HomeTeam + 3

AwayTeam + 3

elseif a == b

HomeTeam + 1

AwayTeam + 1

else

HomeTeam + 0

AwayTeam + 3

end

end

if HomeTeam < AwayTeam && a > b

+1

elseif HomeTeam < AwayTeam && a = b

+0

elseif HomeTeam < AwayTeam && a < b

+0

elseif HomeTeam = AwayTeam && a > b

+1

elseif HomeTeam = AwayTeam && a = b

+0

elseif HomeTeam = AwayTeam && a < b

+1

elseif HomeTeam > AwayTeam && a > b

+0

elseif HomeTeam > AwayTeam && a = b

+0

elseif HomeTeam > AwayTeam && a < b

+1

end