add
This commit is contained in:
1 parent
bd49911eca
commit
e3de01bde8
3742 files changed
+64316
No files matched your search
@@ -0,0 +1,19 @@
|
||||
from math import *
|
||||
from matplotlib.pyplot import plot,show
|
||||
from numpy import *
|
||||
|
||||
T = 2*pi
|
||||
N = 10000
|
||||
t = arange(0., 2*T, T/N)
|
||||
|
||||
def e1(x):
|
||||
return sin(2*pi*x/T)
|
||||
|
||||
def e2(x):
|
||||
res = 0
|
||||
for i in range(1,200):
|
||||
res += (1/(2*i+1)) * sin(2*pi*(2*i+1)*x/T)
|
||||
return res
|
||||
|
||||
plot(t, e1(t), "b", t, e2(t), "r")
|
||||
show()
|
||||
Reference in new issue
Block a user