def F_gauss_sine(t): dt = 10.0 omega = 1.5 return A*exp(-(t-40)**2/dt**2)*sin(t*omega)
def F_sine(t): omega = 7.0e-1 return A*sin(t*omega)
def F_gauss_sine(t): dt = 10.0 omega = 1.5 return A * exp(-(t - 40)**2 / dt**2) * sin(t * omega)
def F_sine(t): omega = 7.0e-1 return A * sin(t * omega)
import scipy import matplotlib.pyplot as graph import math import scipy.special as sp samples=scipy.linspace(0,5,num=101) results=scipy.linspace(0,0,num=101) # Vector assignment results = sp.sin(samples*samples) # Plotting the graph graph.plot(samples,results,'ro',samples,results,'k') graph.show()
import scipy import matplotlib.pyplot as graph import math import scipy.special as sp samples=scipy.linspace(-3,+3,101) results=scipy.linspace(0,0,101) # Vector operation for each k for k in range(1,11,2): results += sp.sin(k*samples)/k # Graph plotting graph.plot(samples,results,'ro',samples,results,'k') graph.show()