day1/session4.tex
branchscipy2010
changeset 410 ec4b97af33e1
parent 389 aa392117454f
equal deleted inserted replaced
409:4442da6bf693 410:ec4b97af33e1
    72 % }
    72 % }
    73 
    73 
    74 
    74 
    75 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    75 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    76 % Title page
    76 % Title page
    77 \title[Matrices \& Curve Fitting]{Python for Science and Engg: Matrices \& Least Square Fit}
    77 \title[Matrices \& Curve Fitting]{Python for Science and Engg: Matrices
       
    78 \& Least Squares Fit}
    78 
    79 
    79 \author[FOSSEE] {FOSSEE}
    80 \author[FOSSEE] {FOSSEE}
    80 
    81 
    81 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    82 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    82 \date[] {30 April, 2010\\Day 1, Session 4}
    83 \date[] {SciPy 2010, Introductory tutorials\\Day 1, Session 4}
    83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    84 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    84 
    85 
    85 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    86 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    86 %\logo{\pgfuseimage{iitmlogo}}
    87 %\logo{\pgfuseimage{iitmlogo}}
    87 
    88 
   162 In []: identity(2)
   163 In []: identity(2)
   163 Out[]: 
   164 Out[]: 
   164 array([[ 1.,  0.],
   165 array([[ 1.,  0.],
   165        [ 0.,  1.]])
   166        [ 0.,  1.]])
   166   \end{lstlisting}
   167   \end{lstlisting}
   167 Also available \alert{\typ{zeros, zeros_like}}
   168 Also available \alert{\typ{zeros, zeros_like, empty, empty_like}}
   168 \end{small}
   169 \end{small}
   169 \end{frame}
   170 \end{frame}
   170 
   171 
   171 
   172 
   172 \begin{frame}[fragile]
   173 \begin{frame}[fragile]
   207 array([[11, 12, 13],
   208 array([[11, 12, 13],
   208        [ 0,  0,  0],
   209        [ 0,  0,  0],
   209        [31, 32, 33]])
   210        [31, 32, 33]])
   210   \end{lstlisting}
   211   \end{lstlisting}
   211   \end{small}
   212   \end{small}
   212 How to access one \alert{column}?
   213 How do you access one \alert{column}?
   213 \end{frame}
   214 \end{frame}
   214 
   215 
   215 \begin{frame}[fragile]
   216 \begin{frame}[fragile]
   216   \frametitle{Slicing}
   217   \frametitle{Slicing}
   217 \begin{small}
   218 \begin{small}
   442 Out[]: array([-1.,  8., -1.])
   443 Out[]: array([-1.,  8., -1.])
   443 \end{lstlisting}
   444 \end{lstlisting}
   444 \end{small}
   445 \end{small}
   445 \end{frame}
   446 \end{frame}
   446 
   447 
   447 %% \begin{frame}[fragile]
   448 \begin{frame}[fragile]
   448 %% \frametitle{Computing Norms}
   449 \frametitle{Computing Norms}
   449 %% \begin{lstlisting}
   450 \begin{lstlisting}
   450 %% In []: norm(e)
   451 In []: norm(e)
   451 %% Out[]: 8.1240384046359608
   452 Out[]: 8.1240384046359608
   452 %% \end{lstlisting}
   453 \end{lstlisting}
   453 %% \end{frame}
   454 \end{frame}
   454 
   455 
   455 %% \begin{frame}[fragile]
   456 \begin{frame}[fragile]
   456 %%   \frametitle{Singular Value Decomposition}
   457   \frametitle{Singular Value Decomposition}
   457 %%   \begin{small}
   458   \begin{small}
   458 %%   \begin{lstlisting}
   459   \begin{lstlisting}
   459 %% In []: svd(e)
   460 In []: svd(e)
   460 %% Out[]: 
   461 Out[]: 
   461 %% (array(
   462 (array(
   462 %% [[ -6.66666667e-01,  -1.23702565e-16,   7.45355992e-01],
   463 [[ -6.66666667e-01,  -1.23702565e-16,   7.45355992e-01],
   463 %%  [ -3.33333333e-01,  -8.94427191e-01,  -2.98142397e-01],
   464  [ -3.33333333e-01,  -8.94427191e-01,  -2.98142397e-01],
   464 %%  [ -6.66666667e-01,   4.47213595e-01,  -5.96284794e-01]]),
   465  [ -6.66666667e-01,   4.47213595e-01,  -5.96284794e-01]]),
   465 %%  array([ 8.,  1.,  1.]),
   466  array([ 8.,  1.,  1.]),
   466 %%  array([[-0.66666667, -0.33333333, -0.66666667],
   467  array([[-0.66666667, -0.33333333, -0.66666667],
   467 %%         [-0.        ,  0.89442719, -0.4472136 ],
   468         [-0.        ,  0.89442719, -0.4472136 ],
   468 %%         [-0.74535599,  0.2981424 ,  0.59628479]]))
   469         [-0.74535599,  0.2981424 ,  0.59628479]]))
   469 %%   \end{lstlisting}
   470   \end{lstlisting}
   470 %%   \end{small}
   471   \end{small}
   471 %% \inctime{15}
   472 \end{frame}
   472 %% \end{frame}
       
   473 
   473 
   474 \section{Least Squares Fit}
   474 \section{Least Squares Fit}
   475 \begin{frame}[fragile]
   475 \begin{frame}[fragile]
   476 \frametitle{$L$ vs. $T^2$ - Scatter}
   476 \frametitle{$L$ vs. $T^2$ - Scatter}
   477 Linear trend visible.
   477 Linear trend visible.
   616       \item Addition
   616       \item Addition
   617       \item Multiplication
   617       \item Multiplication
   618       \item Inverse of a matrix
   618       \item Inverse of a matrix
   619       \item Determinant
   619       \item Determinant
   620       \item Eigenvalues and Eigen vector
   620       \item Eigenvalues and Eigen vector
   621       %% \item Norms
   621       \item Singular Value Decomposition
   622       %% \item Singular Value Decomposition
       
   623     \end{itemize}
   622     \end{itemize}
   624   \item Least Square Curve fitting
   623   \item Least Square Curve fitting
   625   \end{itemize}
   624   \end{itemize}
   626 \end{frame}
   625 \end{frame}
   627 
   626