day1/session4.tex
author Puneeth Chaganti <punchagan@fossee.in>
Thu, 15 Oct 2009 18:46:40 +0530
changeset 129 d3aae4b05e99
parent 127 44c2f614e321
child 131 b3a78754c4a9
permissions -rw-r--r--
Minor edits to day1 session1.
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
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
    55
\newcommand{\typ}[1]{\lstinline{#1}}
118
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
121
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   187
\section{Solving linear equations}
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   188
\begin{frame}[fragile]
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   189
\frametitle{Solution of equations}
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   190
Example problem: Consider the set of equations
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   191
  \begin{align*}
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   192
    3x + 2y - z  & = 1 \\
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   193
    2x - 2y + 4z  & = -2 \\
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   194
    -x + \frac{1}{2}y -z & = 0
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   195
  \end{align*}
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   196
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   197
  To Solve this, 
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   198
  \begin{lstlisting}
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   199
    In []: A = array([[3,2,-1],[2,-2,4],[-1, 0.5, -1]])
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   200
    In []: b = array([1, -2, 0])
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   201
    In []: x = linalg.solve(A, b)
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   202
    In []: Ax = dot(A, x)
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   203
    In []: allclose(Ax, b)
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   204
    Out[]: True
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   205
  \end{lstlisting}
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   206
\end{frame}
ac715f4826f2 Update session4.tex with Linear equations slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 118
diff changeset
   207
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   208
\section{Integration}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   209
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   210
\subsection{ODEs}
124
d43a698712e0 Manual merge with mainline.
Puneeth Chaganti <punchagan@fossee.in>
parents: 123 121
diff changeset
   211
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   212
\begin{frame}[fragile]
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   213
\frametitle{ODE Integration}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   214
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
   215
\begin{equation*}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   216
\ddot{\theta} = -\frac{g}{L}sin(\theta)
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   217
\end{equation*}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   218
\begin{itemize}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   219
\item This equation can be written as a system of two first order ODEs
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   220
\end{itemize}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   221
\begin{align}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   222
\dot{\theta} &= \omega \\
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   223
\dot{\omega} &= -\frac{g}{L}sin(\theta) \\
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   224
 \text{At}\ t &= 0 : \nonumber \\
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   225
 \theta = \theta_0\quad & \&\quad  \omega = 0 \nonumber
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   226
\end{align}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   227
\end{frame}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   228
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   229
\begin{frame}[fragile]
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   230
\frametitle{Solving ODEs using SciPy}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   231
\begin{itemize}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   232
\item We use the \typ{odeint} function from scipy to do the integration
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   233
\item Define a function as below
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   234
\end{itemize}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   235
\begin{lstlisting}
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   236
In []: def pend_int(unknown, t, p):
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   237
  ....     theta, omega = unknown
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   238
  ....     g, L = p
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   239
  ....     f=[omega, -(g/L)*sin(theta)]
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   240
  ....     return f
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   241
  ....
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   242
\end{lstlisting}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   243
\end{frame}
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   244
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   245
\begin{frame}[fragile]
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   246
\frametitle{Solving ODEs using SciPy \ldots}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   247
\begin{itemize}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   248
\item \typ{t} is the time variable \\ 
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   249
\item \typ{p} has the constants \\
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   250
\item \typ{initial} has the initial values
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   251
\end{itemize}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   252
\begin{lstlisting}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   253
In []: t = linspace(0, 10, 101)
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   254
In []: p=(-9.81, 0.2)
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   255
In []: initial = [10*2*pi/360, 0]
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   256
\end{lstlisting}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   257
\end{frame}
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   258
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   259
\begin{frame}[fragile]
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   260
\frametitle{Solving ODEs using SciPy \ldots}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   261
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   262
\small{\typ{In []: from scipy.integrate import odeint}}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   263
\begin{lstlisting}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   264
In []: pend_sol = odeint(pend_int, 
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   265
                         initial,t, 
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   266
                         args=(p,))
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   267
\end{lstlisting}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   268
\end{frame}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   269
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   270
\subsection{Quadrature}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   271
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   272
\begin{frame}[fragile]
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   273
\frametitle{Quadrature}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   274
Calculate the area under $(sin(x) + x^2)$ in the range $(0,1)$
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   275
\small{\typ{In []: from scipy.integrate import quad}}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   276
  \begin{lstlisting}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   277
In []: f(x):
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   278
        return sin(x)+x**2
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   279
In []: integrate.quad(f, 0, 1)
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   280
  \end{lstlisting}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   281
\end{frame}
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   282
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   283
\end{document}
123
d2f4053a2e85 Added first slides for ODE.
Puneeth Chaganti <punchagan@fossee.in>
parents: 118
diff changeset
   284