Minor edits to Session2 Day2.
authorPuneeth Chaganti <punchagan@fossee.in>
Fri, 09 Oct 2009 12:55:34 +0530
changeset 84 338b85a9c864
parent 83 be8c9a71135f
child 88 b040a84de1cc
child 95 691608044ae7
Minor edits to Session2 Day2.
day2/session2.tex
--- a/day2/session2.tex	Fri Oct 09 12:28:30 2009 +0530
+++ b/day2/session2.tex	Fri Oct 09 12:55:34 2009 +0530
@@ -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)