Created
March 19, 2015 01:05
-
-
Save lettergram/94faae9adb1d0c6c8ed0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment