Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- from math import*
- import numpy as np
- def Qin(i,n,teta):
- return max(0,sin(teta-((2*pi*(i-1))/5)))
- def Qn(teta,n):
- S=0
- for p in range(1,n):
- S=S+max(0,sin(teta-((2*pi*(p-1))/5)))
- return S
- X=np.linspace(0,2*pi,100)
- L=list(range(1,6))
- Y1=[Qin(3,5,u) for u in X]
- Y2=[Qn(m,5) for m in X]
- for i in range(1,6):
- plt.subplot(2,2,1)
- plt.plot(X,Y1,'b')
- plt.subplot(2,2,2)
- plt.plot(X,Y2,'r')
- plt.plot(X,Y3,'b')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement