author | Santosh G. Vattam <vattam.santosh@gmail.com> |
Wed, 14 Oct 2009 20:10:26 +0530 | |
changeset 119 | 7ae0f756f050 |
parent 118 | c7f85ba59af3 |
child 121 | ac715f4826f2 |
child 123 | d2f4053a2e85 |
permissions | -rw-r--r-- |
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} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
26 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
27 |
% Taken from Fernando's slides. |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
28 |
\usepackage{ae,aecompl} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
29 |
\usepackage{mathpazo,courier,euler} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
30 |
\usepackage[scaled=.95]{helvet} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
31 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
32 |
\definecolor{darkgreen}{rgb}{0,0.5,0} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
33 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
34 |
\usepackage{listings} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
35 |
\lstset{language=Python, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
36 |
basicstyle=\ttfamily\bfseries, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
37 |
commentstyle=\color{red}\itshape, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
38 |
stringstyle=\color{darkgreen}, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
39 |
showstringspaces=false, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
40 |
keywordstyle=\color{blue}\bfseries} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
41 |
|
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 |
% Macros |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
44 |
\setbeamercolor{emphbar}{bg=blue!20, fg=black} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
45 |
\newcommand{\emphbar}[1] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
46 |
{\begin{beamercolorbox}[rounded=true]{emphbar} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
47 |
{#1} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
48 |
\end{beamercolorbox} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
49 |
} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
50 |
\newcounter{time} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
51 |
\setcounter{time}{0} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
52 |
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
53 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
54 |
\newcommand{\typ}[1]{\texttt{#1}} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
55 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
56 |
\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} } |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
57 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
58 |
%%% This is from Fernando's setup. |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
59 |
% \usepackage{color} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
60 |
% \definecolor{orange}{cmyk}{0,0.4,0.8,0.2} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
61 |
% % Use and configure listings package for nicely formatted code |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
62 |
% \usepackage{listings} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
63 |
% \lstset{ |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
64 |
% language=Python, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
65 |
% basicstyle=\small\ttfamily, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
66 |
% commentstyle=\ttfamily\color{blue}, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
67 |
% stringstyle=\ttfamily\color{orange}, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
68 |
% showstringspaces=false, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
69 |
% breaklines=true, |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
70 |
% postbreak = \space\dots |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
71 |
% } |
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 |
% Title page |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
76 |
\title[Basic Python]{Matrices, Solution of equations and Integration\\} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
77 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
78 |
\author[FOSEE Team] {The FOSSEE Group} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
79 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
80 |
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
81 |
\date[] {31, October 2009\\Day 1, Session 4} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
82 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
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 |
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
85 |
%\logo{\pgfuseimage{iitmlogo}} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
86 |
|
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 |
%% 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
|
89 |
%% the beginning of each subsection: |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
90 |
\AtBeginSubsection[] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
91 |
{ |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
92 |
\begin{frame}<beamer> |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
93 |
\frametitle{Outline} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
94 |
\tableofcontents[currentsection,currentsubsection] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
95 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
96 |
} |
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 |
%%\AtBeginSection[] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
99 |
%%{ |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
100 |
%%\begin{frame}<beamer> |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
101 |
%% \frametitle{Outline} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
102 |
%% \tableofcontents[currentsection,currentsubsection] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
103 |
%%\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
104 |
%%} |
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 |
% 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
|
107 |
% the following command: |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
108 |
%\beamerdefaultoverlayspecification{<+->} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
109 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
110 |
%\includeonlyframes{current,current1,current2,current3,current4,current5,current6} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
111 |
|
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 |
% DOCUMENT STARTS |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
114 |
\begin{document} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
115 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
116 |
\begin{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
117 |
\titlepage |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
118 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
119 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
120 |
\begin{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
121 |
\frametitle{Outline} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
122 |
\tableofcontents |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
123 |
\pausesections |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
124 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
125 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
126 |
\section{Matrices} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
127 |
\subsection{Initializing} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
128 |
\begin{frame}[fragile] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
129 |
\frametitle{Matrices: Initializing} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
130 |
\begin{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
131 |
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
|
132 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
133 |
In []: a |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
134 |
Out[]: |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
135 |
matrix([[1, 2, 3], |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
136 |
[4, 5, 6], |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
137 |
[7, 8, 9]]) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
138 |
\end{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
139 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
140 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
141 |
\subsection{Basic Operations} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
142 |
\begin{frame}[fragile] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
143 |
\frametitle{Inverse of a Matrix} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
144 |
\begin{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
145 |
In []: linalg.inv(a) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
146 |
Out[]: |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
147 |
matrix([[ 3.15221191e+15, -6.30442381e+15, 3.15221191e+15], |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
148 |
[ -6.30442381e+15, 1.26088476e+16, -6.30442381e+15], |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
149 |
[ 3.15221191e+15, -6.30442381e+15, 3.15221191e+15]]) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
150 |
\end{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
151 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
152 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
153 |
\begin{frame}[fragile] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
154 |
\frametitle{Determinant} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
155 |
\begin{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
156 |
In []: linalg.det(a) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
157 |
Out[]: -9.5171266700777579e-16 |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
158 |
\end{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
159 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
160 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
161 |
\begin{frame}[fragile] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
162 |
\frametitle{Computing Norms} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
163 |
\begin{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
164 |
In []: linalg.norm(a) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
165 |
Out[]: 16.881943016134134 |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
166 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
167 |
In []: linalg.norm? |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
168 |
\end{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
169 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
170 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
171 |
\begin{frame}[fragile] |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
172 |
\frametitle{Eigen Values and Eigen Matrix} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
173 |
\begin{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
174 |
In []: linalg.eigvals(a) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
175 |
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
|
176 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
177 |
In []: linalg.eig(a) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
178 |
Out[]: |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
179 |
(array([ 1.61168440e+01, -1.11684397e+00, -1.22196337e-15]), |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
180 |
matrix([[-0.23197069, -0.78583024, 0.40824829], |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
181 |
[-0.52532209, -0.08675134, -0.81649658], |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
182 |
[-0.8186735 , 0.61232756, 0.40824829]])) |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
183 |
\end{lstlisting} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
184 |
\end{frame} |
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
185 |
|
c7f85ba59af3
Added session4.tex.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff
changeset
|
186 |
\end{document} |