summaryrefslogtreecommitdiff
path: root/day1/session4.tex
diff options
context:
space:
mode:
authorSantosh G. Vattam2009-10-28 14:44:47 +0530
committerSantosh G. Vattam2009-10-28 14:44:47 +0530
commitb65272830c1ff9f06f0928cfa1f3962ed594de88 (patch)
tree00b9f577dc3e7305bdf7e6c57cece61dcbb2740f /day1/session4.tex
parented5313daf1a5a1927c550193283c5c3dad55104f (diff)
downloadworkshops-b65272830c1ff9f06f0928cfa1f3962ed594de88.tar.gz
workshops-b65272830c1ff9f06f0928cfa1f3962ed594de88.tar.bz2
workshops-b65272830c1ff9f06f0928cfa1f3962ed594de88.zip
Updated the session 4, day 1 slides.
Diffstat (limited to 'day1/session4.tex')
-rw-r--r--day1/session4.tex20
1 files changed, 18 insertions, 2 deletions
diff --git a/day1/session4.tex b/day1/session4.tex
index f6351a6..f9f0d52 100644
--- a/day1/session4.tex
+++ b/day1/session4.tex
@@ -282,8 +282,6 @@ Let us now look at how to solve this using \kwrd{matrices}
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}
@@ -295,13 +293,31 @@ Out[]:
array([[ 1.],
[-2.],
[-2.]])
+\end{lstlisting}
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{Let's check!}
+\begin{lstlisting}
In []: Ax
Out[]:
matrix([[ 1.00000000e+00],
[ -2.00000000e+00],
[ 2.22044605e-16]])
\end{lstlisting}
+\begin{block}{}
+The last term in the matrix is actually \alert{0}!\\
+We can use \kwrd{allclose()} to check.
+\end{block}
+\begin{lstlisting}
+In []: allclose(Ax, b)
+Out[]: True
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Exercises}
+
\end{frame}
\section{Summary}