It’s a wave

 

import numpy
import pylab
A = .1
w = 0.25
T = 1
t = 2
while (t > 0.0):
x = numpy.arange(0.0, 1.0+0.01, 0.01)
s = A*numpy.cos(((((2*numpy.pi)/w)*(x)) - ((2*numpy.pi)/T)*t))
pylab.plot(x, s)
pylab.ylim(ymax = .15, ymin = -.15)
pylab.xlabel('Postion')
pylab.ylabel('Amplitude')
pylab.title('Cosine Function')
pylab.grid(True)
pylab.savefig("plot_%.2f.png" %t)
t = (t - 0.1)
pylab.close()

Leave a Reply

Your email address will not be published. Required fields are marked *

 characters available

Time limit is exhausted. Please reload the CAPTCHA.