day1/session4.tex
changeset 121 ac715f4826f2
parent 118 c7f85ba59af3
child 124 d43a698712e0
equal deleted inserted replaced
119:7ae0f756f050 121:ac715f4826f2
    93     \frametitle{Outline}
    93     \frametitle{Outline}
    94     \tableofcontents[currentsection,currentsubsection]
    94     \tableofcontents[currentsection,currentsubsection]
    95   \end{frame}
    95   \end{frame}
    96 }
    96 }
    97 
    97 
    98 %%\AtBeginSection[]
    98 \AtBeginSection[]
    99 %%{
    99 {
   100   %%\begin{frame}<beamer>
   100   \begin{frame}<beamer>
   101 %%    \frametitle{Outline}
   101     \frametitle{Outline}
   102   %%  \tableofcontents[currentsection,currentsubsection]
   102     \tableofcontents[currentsection,currentsubsection]
   103   %%\end{frame}
   103   \end{frame}
   104 %%}
   104 }
   105 
   105 
   106 % If you wish to uncover everything in a step-wise fashion, uncomment
   106 % If you wish to uncover everything in a step-wise fashion, uncomment
   107 % the following command: 
   107 % the following command: 
   108 %\beamerdefaultoverlayspecification{<+->}
   108 %\beamerdefaultoverlayspecification{<+->}
   109 
   109 
   181           [-0.52532209, -0.08675134, -0.81649658],
   181           [-0.52532209, -0.08675134, -0.81649658],
   182           [-0.8186735 ,  0.61232756,  0.40824829]]))
   182           [-0.8186735 ,  0.61232756,  0.40824829]]))
   183 \end{lstlisting}
   183 \end{lstlisting}
   184 \end{frame}
   184 \end{frame}
   185 
   185 
       
   186 \section{Solving linear equations}
       
   187 \begin{frame}[fragile]
       
   188 \frametitle{Solution of equations}
       
   189 Example problem: Consider the set of equations
       
   190   \begin{align*}
       
   191     3x + 2y - z  & = 1 \\
       
   192     2x - 2y + 4z  & = -2 \\
       
   193     -x + \frac{1}{2}y -z & = 0
       
   194   \end{align*}
       
   195 
       
   196   To Solve this, 
       
   197   \begin{lstlisting}
       
   198     In []: A = array([[3,2,-1],[2,-2,4],[-1, 0.5, -1]])
       
   199     In []: b = array([1, -2, 0])
       
   200     In []: x = linalg.solve(A, b)
       
   201     In []: Ax = dot(A, x)
       
   202     In []: allclose(Ax, b)
       
   203     Out[]: True
       
   204   \end{lstlisting}
       
   205 \end{frame}
       
   206 
   186 \end{document}
   207 \end{document}