day1/session4.tex
author Puneeth Chaganti <punchagan@fossee.in>
Fri, 06 Nov 2009 14:28:51 +0530
changeset 285 e072cadee389
parent 282 b2dafce03b8d
child 286 ac457f7d1702
permissions -rw-r--r--
Minor edits to session4.
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
%
141
fccf675946bf Made usage of FOSSEE consistent; removed all instances of Team, Group.
Puneeth Chaganti <punchagan@fossee.in>
parents: 131
diff changeset
     4
% Author: FOSSEE 
fccf675946bf Made usage of FOSSEE consistent; removed all instances of Team, Group.
Puneeth Chaganti <punchagan@fossee.in>
parents: 131
diff changeset
     5
% Copyright (c) 2009, FOSSEE, IIT Bombay
118
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}
239
8953675dc056 Added slide numbers.
Puneeth Chaganti <punchagan@fossee.in>
parents: 235
diff changeset
    18
  \useoutertheme{infolines}
118
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
285
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
    77
\title[Matrices \& Curve Fitting]{Python for Science and Engg: Matrices \& Least Square Fit}
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    78
141
fccf675946bf Made usage of FOSSEE consistent; removed all instances of Team, Group.
Puneeth Chaganti <punchagan@fossee.in>
parents: 131
diff changeset
    79
\author[FOSSEE] {FOSSEE}
118
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}
281
ce818f645f6b Added lena.png.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
    82
\date[] {31 October, 2009\\Day 1, Session 4}
118
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
213
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
    99
\AtBeginSection[]
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   100
{
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   101
  \begin{frame}<beamer>
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   102
    \frametitle{Outline}
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   103
    \tableofcontents[currentsection,currentsubsection]
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   104
  \end{frame}
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   105
}
118
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
197
8c42ffdaaeec Updated session 4 slides based on review.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 185
diff changeset
   127
\section{Matrices}
8c42ffdaaeec Updated session 4 slides based on review.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 185
diff changeset
   128
8c42ffdaaeec Updated session 4 slides based on review.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 185
diff changeset
   129
\begin{frame}
8c42ffdaaeec Updated session 4 slides based on review.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 185
diff changeset
   130
\frametitle{Matrices: Introduction}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   131
\alert{All matrix operations are done using \kwrd{arrays}}
179
eea01ca072ff Updated session 2.tex of Day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 178
diff changeset
   132
\end{frame}
eea01ca072ff Updated session 2.tex of Day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 178
diff changeset
   133
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   134
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   135
\frametitle{Matrices: Initializing}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   136
\begin{lstlisting}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   137
In []: A = array([[ 1,  1,  2, -1],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   138
                  [ 2,  5, -1, -9],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   139
                  [ 2,  1, -1,  3],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   140
                  [ 1, -3,  2,  7]])
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   141
In []: A
235
8eab0fee0fc2 Updated session 4 day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 233
diff changeset
   142
Out[]: 
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   143
array([[ 1,  1,  2, -1],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   144
       [ 2,  5, -1, -9],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   145
       [ 2,  1, -1,  3],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   146
       [ 1, -3,  2,  7]])
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   147
\end{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   148
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   149
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   150
\begin{frame}[fragile]
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   151
  \frametitle{Accessing elements}
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   152
  \begin{lstlisting}
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   153
In []: C = array([[1,1,2],
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   154
                  [2,4,1],
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   155
                  [-1,3,7]])
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   156
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   157
In []: C[1][2]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   158
Out[]: 1
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   159
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   160
In []: C[1,2]
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   161
Out[]: 1
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   162
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   163
In []: C[1]
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   164
Out[]: array([2, 4, 1])
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   165
  \end{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   166
\end{frame}
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   167
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   168
\begin{frame}[fragile]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   169
  \frametitle{Changing elements}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   170
  \begin{small}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   171
  \begin{lstlisting}
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   172
In []: C[1,1] = -2
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   173
In []: C
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   174
Out[]: 
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   175
array([[ 1,  1,  2],
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   176
       [ 2, -2,  1],
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   177
       [-1,  3,  7]])
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   178
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   179
In []: C[1] = [0,0,0]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   180
In []: C
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   181
Out[]: 
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   182
array([[ 1,  1,  2],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   183
       [ 0,  0,  0],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   184
       [-1,  3,  7]])
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   185
  \end{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   186
  \end{small}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   187
How to change one \alert{column}?
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   188
\end{frame}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   189
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   190
\begin{frame}[fragile]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   191
  \frametitle{Slicing}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   192
\begin{small}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   193
  \begin{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   194
In []: C[:,1]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   195
Out[]: array([1, 0, 3])
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   196
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   197
In []: C[1,:]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   198
Out[]: array([0, 0, 0])
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   199
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   200
In []: C[0:2,:]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   201
Out[]: 
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   202
array([[1, 1, 2],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   203
       [0, 0, 0]])
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   204
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   205
In []: C[1:3,:]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   206
Out[]: 
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   207
array([[ 0,  0,  0],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   208
       [-1,  3,  7]])
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   209
  \end{lstlisting}
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   210
\end{small}
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   211
\end{frame}
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   212
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   213
\begin{frame}[fragile]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   214
  \frametitle{Slicing \ldots}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   215
\begin{small}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   216
  \begin{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   217
In []: C[:2,:]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   218
Out[]: 
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   219
array([[1, 1, 2],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   220
       [0, 0, 0]])
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   221
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   222
In []: C[1:,:]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   223
Out[]: 
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   224
array([[ 0,  0,  0],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   225
       [-1,  3,  7]])
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   226
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   227
In []: C[1:,:2]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   228
Out[]: 
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   229
array([[ 0,  0],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   230
       [-1,  3]])
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   231
  \end{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   232
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   233
\end{small}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   234
\end{frame}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   235
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   236
\begin{frame}[fragile]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   237
  \frametitle{Striding}
279
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   238
  \begin{small}
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   239
  \begin{lstlisting}
279
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   240
In []: C[::2,:]
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   241
Out[]: 
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   242
array([[ 1,  1,  2],
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   243
       [-1,  3,  7]])
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   244
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   245
In []: C[:,::2]
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   246
Out[]: 
281
ce818f645f6b Added lena.png.
Puneeth Chaganti <punchagan@fossee.in>
parents: 279
diff changeset
   247
xarray([[ 1,  2],
279
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   248
       [ 0,  0],
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   249
       [-1,  7]])
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   250
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   251
In []: C[::2,::2]
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   252
Out[]: 
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   253
array([[ 1,  2],
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   254
       [-1,  7]])
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   255
  \end{lstlisting}
279
e7ce6f9d7e15 Added Striding in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 278
diff changeset
   256
  \end{small}
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   257
\end{frame}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   258
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   259
\begin{frame}[fragile]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   260
  \frametitle{Slicing \& Striding Exercises}
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   261
\begin{small}
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   262
  \begin{lstlisting}
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   263
In []: A = imread('lena.png')
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   264
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   265
In []: imshow(A)
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   266
Out[]: <matplotlib.image.AxesImage object at 0xa0384cc>
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   267
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   268
In []: A.shape 
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   269
Out[]: (512, 512, 4)
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   270
  \end{lstlisting}
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   271
\end{small}
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   272
  \begin{itemize}
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   273
  \item Crop the image to get the top-left quarter
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   274
  \item Crop the image to get only the face
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   275
  \item Resize image to half by dropping alternate pixels
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   276
  \end{itemize}
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   277
\end{frame}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   278
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   279
\begin{frame}[fragile]
285
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   280
  \frametitle{Solutions}
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   281
\begin{small}
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   282
  \begin{lstlisting}
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   283
In []: imshow(A[:256,:256])
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   284
Out[]: <matplotlib.image.AxesImage object at 0xb6f658c>
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   285
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   286
In []: imshow(A[200:400,200:400])
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   287
Out[]: <matplotlib.image.AxesImage object at 0xb757c2c>
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   288
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   289
In []: imshow(A[::2,::2])
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   290
Out[]: <matplotlib.image.AxesImage object at 0xb765c8c>
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   291
  \end{lstlisting}
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   292
\end{small}
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   293
\end{frame}
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   294
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   295
\begin{frame}[fragile]
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   296
\frametitle{Transpose of a Matrix}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   297
\begin{lstlisting}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   298
In []: A.T
235
8eab0fee0fc2 Updated session 4 day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 233
diff changeset
   299
Out[]:
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   300
array([[ 1,  2,  2,  1],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   301
       [ 1,  5,  1, -3],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   302
       [ 2, -1, -1,  2],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   303
       [-1, -9,  3,  7]])
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   304
\end{lstlisting}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   305
\end{frame}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   306
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   307
\begin{frame}[fragile]
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   308
  \frametitle{Sum of all elements}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   309
  \begin{lstlisting}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   310
In []: sum(A)
235
8eab0fee0fc2 Updated session 4 day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 233
diff changeset
   311
Out[]: 12
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   312
  \end{lstlisting}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   313
\end{frame}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   314
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   315
\begin{frame}[fragile]
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   316
  \frametitle{Matrix Addition}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   317
  \begin{lstlisting}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   318
In []: B = array([[3,2,-1,5],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   319
                  [2,-2,4,9],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   320
                  [-1,0.5,-1,-7],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   321
                  [9,-5,7,3]])
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   322
In []: A + B
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   323
Out[]: 
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   324
array([[  4. ,   3. ,   1. ,   4. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   325
       [  4. ,   3. ,   3. ,   0. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   326
       [  1. ,   1.5,  -2. ,  -4. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   327
       [ 10. ,  -8. ,   9. ,  10. ]])
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   328
  \end{lstlisting}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   329
\end{frame}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   330
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   331
\begin{frame}[fragile]
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   332
\frametitle{Elementwise Multiplication}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   333
\begin{lstlisting}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   334
In []: A*B
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   335
Out[]: 
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   336
array([[  3. ,   2. ,  -2. ,  -5. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   337
       [  4. , -10. ,  -4. , -81. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   338
       [ -2. ,   0.5,   1. , -21. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   339
       [  9. ,  15. ,  14. ,  21. ]])
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   340
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   341
\end{lstlisting}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   342
\end{frame}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   343
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   344
\begin{frame}[fragile]
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   345
\frametitle{Matrix Multiplication}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   346
\begin{lstlisting}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   347
In []: dot(A,B)
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   348
Out[]: 
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   349
array([[ -6. ,   6. ,  -6. ,  -3. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   350
       [-64. ,  38.5, -44. ,  35. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   351
       [ 36. , -13.5,  24. ,  35. ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   352
       [ 58. , -26. ,  34. , -15. ]])
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   353
\end{lstlisting}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   354
\end{frame}
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   355
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   356
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   357
\frametitle{Inverse of a Matrix}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   358
\begin{lstlisting}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   359
In []: inv(A)
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   360
\end{lstlisting}
131
b3a78754c4a9 Minor edits to day1 session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 127
diff changeset
   361
\begin{small}
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   362
\begin{lstlisting}
179
eea01ca072ff Updated session 2.tex of Day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 178
diff changeset
   363
Out[]: 
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   364
array([[-0.5 ,  0.55, -0.15,  0.7 ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   365
       [ 0.75, -0.5 ,  0.5 , -0.75],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   366
       [ 0.5 , -0.15, -0.05, -0.1 ],
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   367
       [ 0.25, -0.25,  0.25, -0.25]])
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   368
\end{lstlisting}
131
b3a78754c4a9 Minor edits to day1 session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 127
diff changeset
   369
\end{small}
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   370
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   371
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   372
\begin{frame}[fragile]
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   373
\frametitle{Determinant}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   374
\begin{lstlisting}
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   375
In []: det(A)
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   376
Out[]: 80.0
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   377
\end{lstlisting}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   378
\end{frame}
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   379
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   380
%%use S=array(X,Y)
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   381
\begin{frame}[fragile]
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   382
\frametitle{Eigenvalues and Eigen Vectors}
131
b3a78754c4a9 Minor edits to day1 session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 127
diff changeset
   383
\begin{small}
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   384
\begin{lstlisting}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   385
In []: E = array([[3,2,4],[2,0,2],[4,2,3]])
253
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   386
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   387
In []: eig(E)
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   388
Out[]: 
253
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   389
(array([-1.,  8., -1.]),
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   390
 array([[-0.74535599,  0.66666667, -0.1931126 ],
253
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   391
        [ 0.2981424 ,  0.33333333, -0.78664085],
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   392
        [ 0.59628479,  0.66666667,  0.58643303]]))
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   393
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   394
In []: eigvals(E)
253
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   395
Out[]: array([-1.,  8., -1.])
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   396
\end{lstlisting}
131
b3a78754c4a9 Minor edits to day1 session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 127
diff changeset
   397
\end{small}
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   398
\end{frame}
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   399
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   400
%% \begin{frame}[fragile]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   401
%% \frametitle{Computing Norms}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   402
%% \begin{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   403
%% In []: norm(E)
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   404
%% Out[]: 8.1240384046359608
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   405
%% \end{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   406
%% \end{frame}
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   407
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   408
%% \begin{frame}[fragile]
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   409
%%   \frametitle{Singular Value Decomposition}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   410
%%   \begin{small}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   411
%%   \begin{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   412
%% In []: svd(E)
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   413
%% Out[]: 
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   414
%% (array(
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   415
%% [[ -6.66666667e-01,  -1.23702565e-16,   7.45355992e-01],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   416
%%  [ -3.33333333e-01,  -8.94427191e-01,  -2.98142397e-01],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   417
%%  [ -6.66666667e-01,   4.47213595e-01,  -5.96284794e-01]]),
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   418
%%  array([ 8.,  1.,  1.]),
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   419
%%  array([[-0.66666667, -0.33333333, -0.66666667],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   420
%%         [-0.        ,  0.89442719, -0.4472136 ],
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   421
%%         [-0.74535599,  0.2981424 ,  0.59628479]]))
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   422
%%   \end{lstlisting}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   423
%%   \end{small}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   424
%% \inctime{15}
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   425
%% \end{frame}
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   426
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   427
\section{Least Squares Fit}
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   428
\begin{frame}[fragile]
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   429
\frametitle{$L$ vs. $T^2$}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   430
\vspace{-0.15in}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   431
\begin{figure}
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   432
\includegraphics[width=4in]{data/L-Tsq-points}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   433
\end{figure}
178
8a3a9d98fa84 Changed functions section and some minor edits.
Puneeth Chaganti <punchagan@fossee.in>
parents: 172
diff changeset
   434
\end{frame}
8a3a9d98fa84 Changed functions section and some minor edits.
Puneeth Chaganti <punchagan@fossee.in>
parents: 172
diff changeset
   435
8a3a9d98fa84 Changed functions section and some minor edits.
Puneeth Chaganti <punchagan@fossee.in>
parents: 172
diff changeset
   436
\begin{frame}[fragile]
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   437
\frametitle{$L$ vs. $T^2$}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   438
\vspace{-0.15in}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   439
\begin{figure}
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   440
\includegraphics[width=4in]{data/L-Tsq-Line}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   441
\end{figure}
232
b9748af050c4 Updated the session 4, day 1 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 214
diff changeset
   442
\end{frame}
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   443
232
b9748af050c4 Updated the session 4, day 1 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 214
diff changeset
   444
\begin{frame}[fragile]
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   445
\frametitle{Least Squares Fit}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   446
\vspace{-0.15in}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   447
\begin{figure}
282
b2dafce03b8d Added Slicing and Striding exercises.
Puneeth Chaganti <punchagan@fossee.in>
parents: 281
diff changeset
   448
\includegraphics[width=4in]{data/least-sq-fit}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   449
\end{figure}
232
b9748af050c4 Updated the session 4, day 1 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 214
diff changeset
   450
\end{frame}
b9748af050c4 Updated the session 4, day 1 slides.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 214
diff changeset
   451
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   452
\begin{frame}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   453
\frametitle{Least Square Fit Curve}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   454
\begin{itemize}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   455
\item $T^2$ and $L$ have a linear relationship
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   456
\item Hence, Least Square Fit Curve is a line
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   457
\item we shall use the \typ{lstsq} function
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   458
\end{itemize}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   459
\end{frame}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   460
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   461
\begin{frame}[fragile]
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   462
\frametitle{\typ{lstsq}}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   463
\begin{itemize}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   464
\item We need to fit a line through points for the equation $T^2 = m \cdot L+c$
285
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   465
\item In matrix form, the equation can be represented as $T^2 = A \cdot p$, where A is   
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   466
  $\begin{bmatrix}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   467
  L_1 & 1 \\
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   468
  L_2 & 1 \\
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   469
  \vdots & \vdots\\
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   470
  L_N & 1 \\
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   471
  \end{bmatrix}$
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   472
  and p is 
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   473
  $\begin{bmatrix}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   474
  m\\
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   475
  c\\
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   476
  \end{bmatrix}$
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   477
\item We need to find $p$ to plot the line
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   478
\end{itemize}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   479
\end{frame}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   480
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   481
\begin{frame}[fragile]
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   482
\frametitle{Generating $A$}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   483
\begin{lstlisting}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   484
In []: A = array([L, ones_like(L)])
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   485
In []: A = A.T
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   486
\end{lstlisting}
277
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   487
\begin{small}
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   488
\begin{block}{}
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   489
  \begin{lstlisting}
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   490
In []: ones((3,5))
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   491
Out[]: 
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   492
array([[ 1.,  1.,  1.,  1.,  1.],
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   493
       [ 1.,  1.,  1.,  1.,  1.],
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   494
       [ 1.,  1.,  1.,  1.,  1.]])
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   495
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   496
In []: ones_like([1, 2, 3, 4, 5]) 
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   497
Out[]: array([1, 1, 1, 1, 1])   
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   498
  \end{lstlisting}
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   499
Also available \alert{\typ{zeros, zeros_like, empty, empty_like}}
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   500
\end{block}
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   501
\end{small}
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   502
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   503
%% \begin{itemize}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   504
%% \item A is also called a Van der Monde matrix
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   505
%% \item It can also be generated using \typ{vander}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   506
%% \end{itemize}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   507
%% \begin{lstlisting}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   508
%% In []: A = vander(L, 2)
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   509
%% \end{lstlisting}
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   510
\end{frame}
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   511
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   512
\begin{frame}[fragile]
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   513
\frametitle{\typ{lstsq} \ldots}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   514
\begin{itemize}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   515
\item Now use the \typ{lstsq} function
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   516
\item Along with a lot of things, it returns the least squares solution
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   517
\end{itemize}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   518
\begin{lstlisting}
272
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   519
In []: result = lstsq(A,TSq)
e5fc37a9ca96 Added initial slides of Slicing and Striding to session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 268
diff changeset
   520
In []: coef = result[0]
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   521
\end{lstlisting}
253
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   522
\end{frame}
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   523
e446ed7287d7 Updated session 2 and session 4 slides of day 1.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 240
diff changeset
   524
\begin{frame}[fragile]
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   525
\frametitle{Least Square Fit Line \ldots}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   526
We get the points of the line from \typ{coef}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   527
\begin{lstlisting}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   528
In []: Tline = coef[0]*L + coef[1]
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   529
\end{lstlisting}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   530
\begin{itemize}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   531
\item Now plot Tline vs. L, to get the Least squares fit line. 
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   532
\end{itemize}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   533
\begin{lstlisting}
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   534
In []: plot(L, Tline)
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   535
\end{lstlisting}
127
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   536
\end{frame}
44c2f614e321 Updated Integration section in Session 4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 124
diff changeset
   537
285
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   538
\begin{frame}[fragile]
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   539
\frametitle{Least Squares Fit}
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   540
\vspace{-0.15in}
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   541
\begin{figure}
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   542
\includegraphics[width=4in]{data/least-sq-fit}
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   543
\end{figure}
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   544
\end{frame}
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   545
213
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   546
\section{Summary}
185
e59ab9ab1a89 Manual Merge with Mainline.
Puneeth Chaganti <punchagan@fossee.in>
parents: 179
diff changeset
   547
\begin{frame}
285
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   548
  \frametitle{What did we learn?}
185
e59ab9ab1a89 Manual Merge with Mainline.
Puneeth Chaganti <punchagan@fossee.in>
parents: 179
diff changeset
   549
  \begin{itemize}
213
ce62706cf870 Resolved conflicts manually.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 203
diff changeset
   550
  \item Matrices
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   551
    \begin{itemize}
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 253
diff changeset
   552
      \item Accessing elements
285
e072cadee389 Minor edits to session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 282
diff changeset
   553
      \item Slicing and Striding
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   554
      \item Transpose
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   555
      \item Addition
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   556
      \item Multiplication
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   557
      \item Inverse of a matrix
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   558
      \item Determinant
274
34f71bdd0263 Loads of changes done.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 253
diff changeset
   559
      \item Eigenvalues and Eigen vector
277
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   560
      %% \item Norms
ef9337f7048c Added example for ones_like in session4.
Puneeth Chaganti <punchagan@fossee.in>
parents: 273
diff changeset
   561
      %% \item Singular Value Decomposition
214
19592f802dde Added matrix operations.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 213
diff changeset
   562
    \end{itemize}
268
f978ddc90960 Moved least square fitting to session 4; removed vander function.
Puneeth Chaganti <punchagan@fossee.in>
parents: 263
diff changeset
   563
  \item Least Square Curve fitting
185
e59ab9ab1a89 Manual Merge with Mainline.
Puneeth Chaganti <punchagan@fossee.in>
parents: 179
diff changeset
   564
  \end{itemize}
e59ab9ab1a89 Manual Merge with Mainline.
Puneeth Chaganti <punchagan@fossee.in>
parents: 179
diff changeset
   565
\end{frame}
e59ab9ab1a89 Manual Merge with Mainline.
Puneeth Chaganti <punchagan@fossee.in>
parents: 179
diff changeset
   566
118
c7f85ba59af3 Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
   567
\end{document}