-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_file.py
24 lines (23 loc) · 929 Bytes
/
run_file.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import time
start = time.clock()
import matplotlib.pyplot as plt
from coefficients import *
'''=========================================================================='''
C2_val = np.array([i for i in Coeff2.values()])
print('c(1)2 values are = ',C2_val)
end = time.clock()
print('time taken to run the program is ',end-start,' seconds')
'''=========================================================================='''
##To plot c1(2) vs time period uncomment the following region
plt.figure()
plt.title('omega = %.3f' %omega)
plt.xlabel('$\dfrac{\omega}{2\pi}$t -------->')
plt.ylabel('${C_1}^2$ -------->')
plt.ylim(0,1.1)
if omega!=0:
plt.plot([(i*omega)/(2*np.pi) for i in t_val],[i for i in Coeff2.values()])
else:
C2_val = np.array([i for i in Coeff2.values()])
plt.plot(t_val,C2_val)
plt.show()
'''=========================================================================='''