Update session4.tex with Linear equations slides.
authorSantosh G. Vattam <vattam.santosh@gmail.com>
Thu, 15 Oct 2009 11:23:01 +0530
changeset 121 ac715f4826f2
parent 119 7ae0f756f050
child 122 73374e1ae4f3
Update session4.tex with Linear equations slides.
day1/session4.tex
--- a/day1/session4.tex	Wed Oct 14 20:10:26 2009 +0530
+++ b/day1/session4.tex	Thu Oct 15 11:23:01 2009 +0530
@@ -95,13 +95,13 @@
   \end{frame}
 }
 
-%%\AtBeginSection[]
-%%{
-  %%\begin{frame}<beamer>
-%%    \frametitle{Outline}
-  %%  \tableofcontents[currentsection,currentsubsection]
-  %%\end{frame}
-%%}
+\AtBeginSection[]
+{
+  \begin{frame}<beamer>
+    \frametitle{Outline}
+    \tableofcontents[currentsection,currentsubsection]
+  \end{frame}
+}
 
 % If you wish to uncover everything in a step-wise fashion, uncomment
 % the following command: 
@@ -183,4 +183,25 @@
 \end{lstlisting}
 \end{frame}
 
+\section{Solving linear equations}
+\begin{frame}[fragile]
+\frametitle{Solution of equations}
+Example problem: Consider the set of equations
+  \begin{align*}
+    3x + 2y - z  & = 1 \\
+    2x - 2y + 4z  & = -2 \\
+    -x + \frac{1}{2}y -z & = 0
+  \end{align*}
+
+  To Solve this, 
+  \begin{lstlisting}
+    In []: A = array([[3,2,-1],[2,-2,4],[-1, 0.5, -1]])
+    In []: b = array([1, -2, 0])
+    In []: x = linalg.solve(A, b)
+    In []: Ax = dot(A, x)
+    In []: allclose(Ax, b)
+    Out[]: True
+  \end{lstlisting}
+\end{frame}
+
 \end{document}