From c98b90fe1a9ea076167277b341989daca59da2af Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Mon, 4 Jan 2010 19:08:48 +0530 Subject: Changes at scipy.in --- day1/session6.tex | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'day1/session6.tex') diff --git a/day1/session6.tex b/day1/session6.tex index 906fb54..05b6134 100755 --- a/day1/session6.tex +++ b/day1/session6.tex @@ -216,11 +216,17 @@ Use \kwrd{solve()} \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 @@ Find the root of $sin(x)+cos^2(x)$ nearest to $0$ 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] -- cgit