-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathipython_log.html
More file actions
94 lines (81 loc) · 3.01 KB
/
Copy pathipython_log.html
File metadata and controls
94 lines (81 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><no title> — Python scientifique - ENS Paris</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2013.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/translations.js"></script>
<link rel="top" title="Python scientifique - ENS Paris" href="../index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li><a href="../index.html">Python scientifique - ENS Paris</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="body">
<p id="example-ipython-log-py"><strong>Python source code:</strong> <a class="reference download internal" href="../_downloads/ipython_log.py"><tt class="xref download docutils literal"><span class="pre">ipython_log.py</span></tt></a></p>
<div class="highlight-python"><pre> theta, theta_dot = theta_thetadot
return [theta_dot, - np.sin(theta)]
from scipy import odeint
from scipy.integrate import odeint
theta_thetadot = (np.pi / 3, 0)
t = np.linspace(0, 5 * np.pi, 1000)
sol = odeint(simple_pendulum, (np.pi/3, 0), t)
theta, theta_dot = sol.T
plot(t, theta_dot)
plot(t, theta)
clf()
plot(t, theta, lw=3)
plot(t, theta_dot, lw=3)
clf()
plot(t, theta_dot, lw=3, label=u'$\theta$')
legend()
clf()
plot(t, theta_dot, lw=3, label=u'$\\theta$')
legend()
get_ipython().magic(u'logon')
get_ipython().magic(u'logstart')
get_ipython().magic(u'logstop')
</pre>
</div>
<p><div style="clear: both"></div></p>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li><a href="../index.html">Python scientifique - ENS Paris</a> »</li>
</ul>
</div>
<!-- your html code here -->
<a href="http://www.ens.fr"><img src="../_static/ENS_Logo.png"
alt="ENS" height="100"></a>
<a href="http://www.inria.fr"><img src="../_static/logo-inria.jpg"
alt="INRIA" height="60"></a>
<a href="http://www.saint-gobain-recherche.fr/fr/"><img
src="../_static/logoSGR.png" alt="Saint-Gobain Recherche" height="60"></a>
<script language="JavaScript"
src="http://freehostedscripts.net/ocount.php?site=ID1953783&name=pages
visitées"></script>
</body>
</html>