From 8b33fcbc1a886583c520152f5137b5f978da502e Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Fri, 20 Nov 2009 00:05:50 +0530 Subject: Minor edits to sessions 2, 4, 6 on day1. --- day1/session6.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'day1/session6.tex') diff --git a/day1/session6.tex b/day1/session6.tex index acfc687..0f1523e 100755 --- a/day1/session6.tex +++ b/day1/session6.tex @@ -328,7 +328,7 @@ In []: def epid(y, t): \begin{frame}[fragile] \frametitle{Solving ODEs using SciPy \ldots} \begin{lstlisting} -In []: t = arange(0, 12, 0.2) +In []: t = linspace(0, 12, 61) In []: y = odeint(epid, 250, t) -- cgit From dfd30ccfe16229203702ae0332165e14fdaf80cf Mon Sep 17 00:00:00 2001 From: Shantanu Date: Tue, 22 Dec 2009 14:10:37 +0530 Subject: commited changes made for scipy and cheatsheats. --- day1/session6.tex | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'day1/session6.tex') diff --git a/day1/session6.tex b/day1/session6.tex index 0f1523e..906fb54 100755 --- a/day1/session6.tex +++ b/day1/session6.tex @@ -78,7 +78,7 @@ \author[FOSSEE] {FOSSEE} \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} -\date[] {7 November, 2009\\Day 1, Session 6} +\date[] {14 December, 2009\\Day 1, Session 6} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} @@ -150,7 +150,6 @@ Let us now look at how to solve this using \kwrd{matrices} [-1, 0.5, -1]]) In []: b = array([[1], [-2], [0]]) In []: x = solve(A, b) - In []: Ax = dot(A,x) \end{lstlisting} \end{frame} @@ -168,6 +167,7 @@ array([[ 1.], \begin{frame}[fragile] \frametitle{Let's check!} \begin{lstlisting} +In []: Ax = dot(A,x) In []: Ax Out[]: array([[ 1.00000000e+00], @@ -318,6 +318,7 @@ Out[]: -0.66623943249251527 \item Define a function as below \end{itemize} \begin{lstlisting} +In []: from scipy.integrate import odeint In []: def epid(y, t): .... k, L = 0.00003, 25000 .... return k*y*(L-y) @@ -337,6 +338,14 @@ In []: plot(t, y) %Insert Plot \end{frame} +\begin{frame}[fragile] +\frametitle{Result} +\begin{center} +\includegraphics[height=2in, interpolate=true]{data/image} +\end{center} +\end{frame} + + \begin{frame}[fragile] \frametitle{ODEs - Simple Pendulum} We shall use the simple ODE of a simple pendulum. @@ -392,6 +401,12 @@ In []: pend_sol = odeint(pend_int, \end{lstlisting} \end{frame} +\begin{frame}[fragile] +\frametitle{Result} +\begin{center} +\includegraphics[height=2in, interpolate=true]{data/ode} +\end{center} +\end{frame} \begin{frame} \frametitle{Things we have learned} -- cgit