Building the textbook

This commit is contained in:
mhjensen
2018-01-27 10:10:34 -05:00
parent 9eac260c73
commit 6eb5acf151
18 changed files with 20661 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import numpy as np
t = np.linspace(0, 10, 21) # 20 intervals in [0, 10]
dt = t[1] - t[0]
N = np.zeros(t.size)
N[0] = 1
r = 0.5
for n in range(0, N.size-1, 1):
N[n+1] = N[n] + r*dt*N[n]
print 'N[%d]=%.1f' % (n+1, N[n+1])