/[escript]/trunk/doc/examples/cookbook/cerjen.py
ViewVC logotype

Contents of /trunk/doc/examples/cookbook/cerjen.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2829 - (show annotations)
Wed Jan 6 02:51:31 2010 UTC (9 years, 1 month ago) by ahallam
File MIME type: text/x-python
File size: 299 byte(s)
minor updates to cookbook
1 import pylab as pl
2 import numpy as np
3
4 s=0
5 e=20
6 x = np.linspace(s,e,1000)
7
8 y = np.exp(-1.0*(0.005*(s-x))**2)
9
10 pl.plot(x,y)
11 pl.title("cerjen damping")
12
13
14
15 pl.savefig("cerjen.png")
16
17
18 x2= np.linspace(0,0.1,333)
19
20 y2=np.exp(-50.*x2)*np.sin(40*3.14157*x2)
21
22 pl.clf()
23 pl.plot(x2,y2)
24 pl.savefig("source.png")

  ViewVC Help
Powered by ViewVC 1.1.26