day1/session6.tex
changeset 337 56aa2efbf7d9
parent 330 46533051b9d3
child 339 8ac5fe07810f
--- a/day1/session6.tex	Tue Dec 29 19:26:13 2009 +0530
+++ b/day1/session6.tex	Mon Jan 04 19:08:48 2010 +0530
@@ -216,11 +216,17 @@
 \frametitle{Scipy Methods - \typ{roots}}
 \begin{itemize}
 \item Calculates the roots of polynomials
+\item To calculate the roots of $x^2-5x+6$ 
 \end{itemize}
 \begin{lstlisting}
-  In []: coeffs = [1, 6, 13]
+  In []: coeffs = [1, -5, 6]
   In []: roots(coeffs)
+  Out[]: array([3., 2.])
 \end{lstlisting}
+\vspace*{-.2in}
+\begin{center}
+\includegraphics[height=1.6in, interpolate=true]{data/roots}    
+\end{center}
 \end{frame}
 
 \begin{frame}[fragile]
@@ -291,6 +297,9 @@
 In []: fsolve(f, 0)
 Out[]: -0.66623943249251527
 \end{lstlisting}
+\begin{center}
+\includegraphics[height=2in, interpolate=true]{data/fsolve}    
+\end{center}
 \end{frame}
 
 %% \begin{frame}[fragile]