Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %Betapet rating calculator
- clear all;
- Am = input('Antal matcher: ');
- Ar = input('Din rating: ');
- Br = input('Motståndarens rating: ');
- Ap = linspace(0,500,500);
- Bp = Ap;
- X = zeros(500, 500);
- for ii=1:500
- for jj=1:500
- X(ii,jj) = Ap(ii)^2/(Ap(ii)^2+Bp(jj)^2);
- X(ii,jj) = X(ii,jj)-(Ar/(Ar+Br));
- X(ii,jj) = X(ii,jj)*Ar*(0.1+0.2*exp(-0.1*Am));
- end
- end
- mesh(X)
- xlabel('Motståndarens poäng')
- ylabel('Din poäng')
- zlabel('Ratingförändring')
Advertisement
Add Comment
Please, Sign In to add comment