diff options
author | Santosh G. Vattam | 2009-10-09 16:59:30 +0530 |
---|---|---|
committer | Santosh G. Vattam | 2009-10-09 16:59:30 +0530 |
commit | 2aa27f55cc5ee298c557fb0d00597aaef9eb3281 (patch) | |
tree | 619e748f7c5fd1b2d6b50c20f7219275f093f224 /day2 | |
parent | 260bbb26aa0beb9b65606dda32efa12e0c3a68e8 (diff) | |
parent | cfde727f0f29e83c6aea85231057e679281f6ac3 (diff) | |
download | workshops-2aa27f55cc5ee298c557fb0d00597aaef9eb3281.tar.gz workshops-2aa27f55cc5ee298c557fb0d00597aaef9eb3281.tar.bz2 workshops-2aa27f55cc5ee298c557fb0d00597aaef9eb3281.zip |
Merged branches.
Diffstat (limited to 'day2')
-rw-r--r-- | day2/session2.tex | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/day2/session2.tex b/day2/session2.tex index f93b02f..0f471f5 100644 --- a/day2/session2.tex +++ b/day2/session2.tex @@ -338,12 +338,12 @@ Numerically solve ODEs\\ \begin{align*} \frac{dx}{dt}&=-e^{-t}x^2\\ - x(0)&=2 + x&=2 \quad at \ t=0 \end{align*} \begin{lstlisting} >>> def dx_dt(x,t): return -np.exp(-t)*x**2 - +>>> t=np.linspace(0,2,100) >>> x=integrate.odeint(dx_dt, 2, t) >>> plt.plot(x,t) \end{lstlisting} @@ -372,8 +372,6 @@ \frametitle{Interpolation - Splines} Plot the Cubic Spline of $sin(x)$ \begin{lstlisting} ->>> x = np.arange(0,2*np.pi,np.pi/4) ->>> y = np.sin(x) >>> tck = interpolate.splrep(x,y) >>> X = np.arange(0,2*np.pi,np.pi/50) >>> Y = interpolate.splev(X,tck,der=0) |