diff options
author | Santosh G. Vattam | 2009-10-15 11:23:01 +0530 |
---|---|---|
committer | Santosh G. Vattam | 2009-10-15 11:23:01 +0530 |
commit | 6c6099c68505c68edeb9921fdd4cb5eefaa00f82 (patch) | |
tree | da73d9ea723dd5ead3ed5a30fba5634031ee9175 | |
parent | 724b2d6700a355fbd83836d063c718ad317c3aed (diff) | |
download | workshops-6c6099c68505c68edeb9921fdd4cb5eefaa00f82.tar.gz workshops-6c6099c68505c68edeb9921fdd4cb5eefaa00f82.tar.bz2 workshops-6c6099c68505c68edeb9921fdd4cb5eefaa00f82.zip |
Update session4.tex with Linear equations slides.
-rw-r--r-- | day1/session4.tex | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/day1/session4.tex b/day1/session4.tex index 978ef66..3796e6c 100644 --- a/day1/session4.tex +++ b/day1/session4.tex @@ -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} |