-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathez_plot2.py
More file actions
51 lines (46 loc) · 1.29 KB
/
ez_plot2.py
File metadata and controls
51 lines (46 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/python
import numpy as np
import matplotlib.pyplot as plt
import math
koef = 1000
firstlvl = 5000
rounds = 10
totallvl = 100
# x = np.arange(-200, 200)
# mathf = np.exp((-((x)**2))/40.0)
x = np.linspace(0.0, 50.0, 1000)
x1 = x/1.0
plt.plot(x, np.sin(x1)/x1 , 'r.')
plt.xlabel(r'$x$')
plt.ylabel(r'$f(x)$')
plt.grid(1)
plt.ylim([0,1.2])
plt.show()
# # x = np.arange(-200, 200)
# # mathf = np.exp((-((x)**2))/40.0)
# x = np.linspace(0.0, 1.0, 100)
# coeffs = [ 0.0, 0.25, 0.5, 0.75, 1.0 ]
#
# # decay = 2.0
# # mathf = [ x + (c*decay*(0.25 - (x-0.5)**2)) for c in coeffs ]
#
# decay = 2.0
# mathf = [ x + (c*decay*(0.25 - 1.5*(x-0.6)**2)) for c in coeffs ]
#
# plt.plot(x, mathf[0] , 'r.')
# plt.plot(x, mathf[1] , 'g.')
# plt.plot(x, mathf[2] , 'b.')
# plt.plot(x, mathf[3] , 'y.')
# plt.plot(x, mathf[4] , 'k.')
# plt.xlabel(r'$x$')
# plt.ylabel(r'$f(x)$')
# plt.grid(1)
# plt.ylim([0,1.2])
# plt.show()
#
# print 'Rounds to WIN: ' + str(np.sum(mathf)/firstlvl * rounds)
# print '20th lvl rounds: ' + str(mathf[20]/firstlvl * rounds)
# print '40h lvl rounds: ' + str(mathf[40]/firstlvl * rounds)
# print '60h lvl rounds: ' + str(mathf[60]/firstlvl * rounds)
# print 'PreLast lvl rounds: ' + str(mathf[totallvl-2]/firstlvl * rounds)
# print 'Last lvl rounds: ' + str(mathf[totallvl-1]/firstlvl * rounds)