summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantosh G. Vattam2009-10-27 17:11:52 +0530
committerSantosh G. Vattam2009-10-27 17:11:52 +0530
commit8db7d15742085fc03549be61489f74fe687dd7d6 (patch)
tree769ff16dc8ff6385e9f0156e943c5e39c20d799c
parentc627f89e4c736c1b0701576af65b9a29124484a2 (diff)
downloadworkshops-8db7d15742085fc03549be61489f74fe687dd7d6.tar.gz
workshops-8db7d15742085fc03549be61489f74fe687dd7d6.tar.bz2
workshops-8db7d15742085fc03549be61489f74fe687dd7d6.zip
Updated session 4 slides based on review.
-rw-r--r--day1/session4.tex97
1 files changed, 52 insertions, 45 deletions
diff --git a/day1/session4.tex b/day1/session4.tex
index 4f1eb7d..b466ca1 100644
--- a/day1/session4.tex
+++ b/day1/session4.tex
@@ -124,54 +124,14 @@
% \pausesections
\end{frame}
-\section{Solving linear equations}
-\begin{frame}[fragile]
-\frametitle{Solution of equations}
-Consider,
- \begin{align*}
- 3x + 2y - z & = 1 \\
- 2x - 2y + 4z & = -2 \\
- -x + \frac{1}{2}y -z & = 0
- \end{align*}
-Solution:
- \begin{align*}
- x & = 1 \\
- y & = -2 \\
- z & = -2
- \end{align*}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{Solving using Matrices}
-Let us now look at how to solve this using \kwrd{matrices}
- \begin{lstlisting}
- In []: A = matrix([[3,2,-1],[2,-2,4],[-1, 0.5, -1]])
- In []: b = matrix([[1], [-2], [0]])
- In []: x = linalg.solve(A, b)
- In []: Ax = dot(A, x)
- In []: allclose(Ax, b)
- Out[]: True
- \end{lstlisting}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{Solution:}
-\begin{lstlisting}
-In []: x
-Out[]:
-array([[ 1.],
- [-2.],
- [-2.]])
+\section{Matrices}
-In []: Ax
-Out[]:
-matrix([[ 1.00000000e+00],
- [ -2.00000000e+00],
- [ 2.22044605e-16]])
-\end{lstlisting}
+\begin{frame}
+\frametitle{Matrices: Introduction}
+We looked at the Van der Monde matrix in the previous session,\\
+let us now look at matrices in a little more detail.
\end{frame}
-\section{Matrices}
\subsection{Initializing}
\begin{frame}[fragile]
\frametitle{Matrices: Initializing}
@@ -237,6 +197,53 @@ matrix([[ 0.07734807, 0.01657459, 0.32044199],
\end{small}
\end{frame}
+\section{Solving linear equations}
+
+\begin{frame}[fragile]
+\frametitle{Solution of equations}
+Consider,
+ \begin{align*}
+ 3x + 2y - z & = 1 \\
+ 2x - 2y + 4z & = -2 \\
+ -x + \frac{1}{2}y -z & = 0
+ \end{align*}
+Solution:
+ \begin{align*}
+ x & = 1 \\
+ y & = -2 \\
+ z & = -2
+ \end{align*}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Solving using Matrices}
+Let us now look at how to solve this using \kwrd{matrices}
+ \begin{lstlisting}
+ In []: A = matrix([[3,2,-1],[2,-2,4],[-1, 0.5, -1]])
+ In []: b = matrix([[1], [-2], [0]])
+ In []: x = linalg.solve(A, b)
+ In []: Ax = dot(A, x)
+ In []: allclose(Ax, b)
+ Out[]: True
+ \end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Solution:}
+\begin{lstlisting}
+In []: x
+Out[]:
+array([[ 1.],
+ [-2.],
+ [-2.]])
+
+In []: Ax
+Out[]:
+matrix([[ 1.00000000e+00],
+ [ -2.00000000e+00],
+ [ 2.22044605e-16]])
+\end{lstlisting}
+\end{frame}
\section{Integration}