summaryrefslogtreecommitdiff
path: root/day1
diff options
context:
space:
mode:
authorPuneeth Chaganti2010-01-10 17:57:01 +0530
committerPuneeth Chaganti2010-01-10 17:57:01 +0530
commit4e4e1f277fc007daa5ff53b8cddca8f939af26ce (patch)
tree7dec22f84c0b4009aeb0335e0953c2b63fc4274f /day1
parentc03736292e687074942694c660f83700ce4b673b (diff)
downloadworkshops-4e4e1f277fc007daa5ff53b8cddca8f939af26ce.tar.gz
workshops-4e4e1f277fc007daa5ff53b8cddca8f939af26ce.tar.bz2
workshops-4e4e1f277fc007daa5ff53b8cddca8f939af26ce.zip
Removed cheatsheet5 day1.
Diffstat (limited to 'day1')
-rw-r--r--day1/cheatsheet5.tex49
1 files changed, 0 insertions, 49 deletions
diff --git a/day1/cheatsheet5.tex b/day1/cheatsheet5.tex
deleted file mode 100644
index cf9b405..0000000
--- a/day1/cheatsheet5.tex
+++ /dev/null
@@ -1,49 +0,0 @@
-\documentclass[12pt]{article}
-\title{Matrices and Solution of Equations}
-\author{FOSSEE}
-\begin{document}
-\date{}
-\vspace{-1in}
-\begin{center}
-\LARGE{Interpolation, Differentiation and Integration}\\
-\large{FOSSEE}
-\end{center}
-\section{}
-Loading a data file
-\begin{verbatim}
-In [2]: x, y = loadtxt('points.txt', unpack = True)
-#load data file directly into Arrays.
-\end{verbatim}
-\section{}
-Interpolate
-\begin{verbatim}
-In []: from scipy.interpolate import splrep
-In []: tck = splrep(x,y) #get spline curve representation for x,y.
-In []: from scipy.interpolate import splev
-#To evaluate spline and it's derivatives.
-In []: Xnew = arange(0.01,3,0.02)
-#missing set of points
-In []: Ynew = splev(Xnew, tck)
-#Value of function at Xnew
-In []: plot(Xnew, Ynew)
-\end{verbatim}
-
-\section{Differentiation}
-Taylor series - finite difference approximations
-$f(x+h)=f(x)+hf^{'}(x)$ Forward
-\begin{verbatim}
-In []: x = linspace(0, 2*pi, 100)
-In []: y = sin(x)
-In []: deltax = x[1] - x[0]
-In []: fD = (y[1:] - y[:-1]) / deltax
-#fD is the required forward difference
-\end{verbatim}
-
-\section{Quadrature}
-$\int_0^1(sin(x) + x^2)$
-In []: def f(x):
- return sin(x)+x**2
-In []: from scipy.integrate import quad
-In []: quad(f, 0, 1)
-\end{document}
-