day1/session4.tex
author Puneeth Chaganti <punchagan@fossee.in>
Thu, 15 Oct 2009 11:30:08 +0530
changeset 123 d2f4053a2e85
parent 118 c7f85ba59af3
child 124 d43a698712e0
permissions -rw-r--r--
Added first slides for ODE.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     2
%Tutorial slides on Python.
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     3
%
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     4
% Author: The FOSSEE Group
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     5
% Copyright (c) 2009, The FOSSEE Group, IIT Bombay
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     7
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     8
\documentclass[14pt,compress]{beamer}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     9
%\documentclass[draft]{beamer}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    10
%\documentclass[compress,handout]{beamer}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    11
%\usepackage{pgfpages} 
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    12
%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    13
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    14
% Modified from: generic-ornate-15min-45min.de.tex
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    15
\mode<presentation>
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    16
{
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    17
  \usetheme{Warsaw}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    18
  \useoutertheme{split}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    19
  \setbeamercovered{transparent}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    20
}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    21
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    22
\usepackage[english]{babel}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    23
\usepackage[latin1]{inputenc}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    24
%\usepackage{times}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    25
\usepackage[T1]{fontenc}
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
    26
\usepackage{amsmath}
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    27
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    28
% Taken from Fernando's slides.
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    29
\usepackage{ae,aecompl}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    30
\usepackage{mathpazo,courier,euler}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    31
\usepackage[scaled=.95]{helvet}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    32
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    33
\definecolor{darkgreen}{rgb}{0,0.5,0}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    34
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    35
\usepackage{listings}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    36
\lstset{language=Python,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    37
    basicstyle=\ttfamily\bfseries,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    38
    commentstyle=\color{red}\itshape,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    39
  stringstyle=\color{darkgreen},
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    40
  showstringspaces=false,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    41
  keywordstyle=\color{blue}\bfseries}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    42
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    43
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    44
% Macros
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    45
\setbeamercolor{emphbar}{bg=blue!20, fg=black}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    46
\newcommand{\emphbar}[1]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    47
{\begin{beamercolorbox}[rounded=true]{emphbar} 
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    48
      {#1}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    49
 \end{beamercolorbox}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    50
}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    51
\newcounter{time}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    52
\setcounter{time}{0}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    53
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    54
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    55
\newcommand{\typ}[1]{\texttt{#1}}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    56
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    57
\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}}  }
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    58
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    59
%%% This is from Fernando's setup.
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    60
% \usepackage{color}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    61
% \definecolor{orange}{cmyk}{0,0.4,0.8,0.2}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    62
% % Use and configure listings package for nicely formatted code
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    63
% \usepackage{listings}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    64
% \lstset{
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    65
%    language=Python,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    66
%    basicstyle=\small\ttfamily,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    67
%    commentstyle=\ttfamily\color{blue},
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    68
%    stringstyle=\ttfamily\color{orange},
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    69
%    showstringspaces=false,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    70
%    breaklines=true,
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    71
%    postbreak = \space\dots
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    72
% }
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    73
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    74
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    75
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    76
% Title page
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    77
\title[Basic Python]{Matrices, Solution of equations and Integration\\}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    78
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    79
\author[FOSEE Team] {The FOSSEE Group}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    80
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    81
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    82
\date[] {31, October 2009\\Day 1, Session 4}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    83
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    84
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    85
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    86
%\logo{\pgfuseimage{iitmlogo}}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    87
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    88
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    89
%% Delete this, if you do not want the table of contents to pop up at
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    90
%% the beginning of each subsection:
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    91
\AtBeginSubsection[]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    92
{
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    93
  \begin{frame}<beamer>
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    94
    \frametitle{Outline}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    95
    \tableofcontents[currentsection,currentsubsection]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    96
  \end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    97
}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    98
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    99
%%\AtBeginSection[]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   100
%%{
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   101
  %%\begin{frame}<beamer>
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   102
%%    \frametitle{Outline}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   103
  %%  \tableofcontents[currentsection,currentsubsection]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   104
  %%\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   105
%%}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   106
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   107
% If you wish to uncover everything in a step-wise fashion, uncomment
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   108
% the following command: 
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   109
%\beamerdefaultoverlayspecification{<+->}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   110
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   111
%\includeonlyframes{current,current1,current2,current3,current4,current5,current6}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   112
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   113
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   114
% DOCUMENT STARTS
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   115
\begin{document}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   116
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   117
\begin{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   118
  \titlepage
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   119
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   120
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   121
\begin{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   122
  \frametitle{Outline}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   123
  \tableofcontents
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   124
%  \pausesections
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   125
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   126
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   127
\section{Matrices}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   128
\subsection{Initializing}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   129
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   130
\frametitle{Matrices: Initializing}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   131
\begin{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   132
  In []: a = matrix([[1,2,3],[4,5,6],[7,8,9]])
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   133
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   134
  In []: a
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   135
  Out[]: 
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   136
  matrix([[1, 2, 3],
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   137
         [4, 5, 6],
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   138
         [7, 8, 9]])
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   139
\end{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   140
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   141
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   142
\subsection{Basic Operations}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   143
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   144
\frametitle{Inverse of a Matrix}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   145
\begin{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   146
  In []: linalg.inv(a)
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   147
  Out[]: 
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   148
  matrix([[  3.15221191e+15,  -6.30442381e+15,   3.15221191e+15],
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   149
          [ -6.30442381e+15,   1.26088476e+16,  -6.30442381e+15],
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   150
          [  3.15221191e+15,  -6.30442381e+15,   3.15221191e+15]])
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   151
\end{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   152
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   153
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   154
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   155
\frametitle{Determinant}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   156
\begin{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   157
  In []: linalg.det(a)
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   158
  Out[]: -9.5171266700777579e-16
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   159
\end{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   160
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   161
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   162
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   163
\frametitle{Computing Norms}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   164
\begin{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   165
  In []: linalg.norm(a)
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   166
  Out[]: 16.881943016134134
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   167
  
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   168
  In []: linalg.norm?
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   169
\end{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   170
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   171
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   172
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   173
\frametitle{Eigen Values and Eigen Matrix}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   174
\begin{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   175
  In []: linalg.eigvals(a)
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   176
  Out[]: array([  1.61168440e+01,  -1.11684397e+00,  -1.22196337e-15])
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   177
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   178
  In []: linalg.eig(a)
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   179
  Out[]: 
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   180
  (array([  1.61168440e+01,  -1.11684397e+00,  -1.22196337e-15]),
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   181
   matrix([[-0.23197069, -0.78583024,  0.40824829],
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   182
          [-0.52532209, -0.08675134, -0.81649658],
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   183
          [-0.8186735 ,  0.61232756,  0.40824829]]))
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   184
\end{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   185
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   186
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   187
\begin{frame}[fragile]
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   188
\frametitle{ODE Integration}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   189
We shall use the simple ODE of a simple pendulum. 
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   190
\begin{equation*}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   191
\ddot{\theta} = -\frac{g}{L}sin(\theta)
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   192
\end{equation*}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   193
\begin{itemize}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   194
\item This equation can be written as a system of two first order ODEs
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   195
\item $\dot{\theta} = \omega$
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   196
\item $\dot{\omega} = -\frac{g}{L}sin(\theta)$
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   197
\item At $t = 0$  \\
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   198
$\theta = \theta_0$ \&
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   199
$\omega = 0$
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   200
\end{itemize}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   201
\begin{lstlisting}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   202
\end{lstlisting}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   203
\end{frame}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   204
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   205
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   206
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   207
\end{document}
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   208
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   209
\begin{frame}[fragile]
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   210
\frametitle{}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   211
\begin{lstlisting}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   212
\end{lstlisting}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   213
\end{frame}