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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5707 - (hide annotations)
Mon Jun 29 03:59:06 2015 UTC (3 years, 7 months ago) by sshaw
File MIME type: text/x-python
File size: 943 byte(s)
adding copyright headers to files without copyright info, moved header to top of file in some cases where it wasn't
1 sshaw 5707
2     ##############################################################################
3     #
4     # Copyright (c) 2003-2015 by The University of Queensland
5     # http://www.uq.edu.au
6     #
7     # Primary Business: Queensland, Australia
8     # Licensed under the Open Software License version 3.0
9     # http://www.opensource.org/licenses/osl-3.0.php
10     #
11     # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     # Development 2012-2013 by School of Earth Sciences
13     # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14     #
15     ##############################################################################
16    
17 sshaw 5706 from __future__ import division, print_function
18    
19 ahallam 2829 import pylab as pl
20     import numpy as np
21    
22     s=0
23     e=20
24     x = np.linspace(s,e,1000)
25    
26     y = np.exp(-1.0*(0.005*(s-x))**2)
27    
28     pl.plot(x,y)
29     pl.title("cerjen damping")
30    
31    
32    
33     pl.savefig("cerjen.png")
34    
35    
36     x2= np.linspace(0,0.1,333)
37    
38     y2=np.exp(-50.*x2)*np.sin(40*3.14157*x2)
39    
40     pl.clf()
41     pl.plot(x2,y2)
42     pl.savefig("source.png")

  ViewVC Help
Powered by ViewVC 1.1.26