diff options
author | Shantanu Choudhary | 2009-12-22 14:10:37 +0530 |
---|---|---|
committer | Shantanu Choudhary | 2009-12-22 14:10:37 +0530 |
commit | 534604c38b300b6b419362c487cbf779e7f76ea8 (patch) | |
tree | 1521217ba931f93a96ad98c3019110c89a720b8a /day1/session6.tex | |
parent | b902fbdf147a74f1c38b6f00208d753e7021e4ae (diff) | |
download | workshops-534604c38b300b6b419362c487cbf779e7f76ea8.tar.gz workshops-534604c38b300b6b419362c487cbf779e7f76ea8.tar.bz2 workshops-534604c38b300b6b419362c487cbf779e7f76ea8.zip |
commited changes made for scipy and cheatsheats.
Diffstat (limited to 'day1/session6.tex')
-rwxr-xr-x | day1/session6.tex | 19 |
1 files changed, 17 insertions, 2 deletions
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) @@ -338,6 +339,14 @@ In []: plot(t, y) \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. \begin{equation*} @@ -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} |