diff options
author | Puneeth Chaganti | 2009-10-23 18:23:32 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2009-10-23 18:23:32 +0530 |
commit | 70062fc1442b81f84df3afbd4330462e735c020a (patch) | |
tree | e4c0d2806e41b9e3eef11089b1772cada34b0dda /day1/session3.tex | |
parent | 2c3db1e7de138b5f0e1db7263c09776d8d7c2a3b (diff) | |
download | workshops-70062fc1442b81f84df3afbd4330462e735c020a.tar.gz workshops-70062fc1442b81f84df3afbd4330462e735c020a.tar.bz2 workshops-70062fc1442b81f84df3afbd4330462e735c020a.zip |
Adding reading files and plotting to day1 session1.
Diffstat (limited to 'day1/session3.tex')
-rw-r--r-- | day1/session3.tex | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/day1/session3.tex b/day1/session3.tex index bca7e20..eb5c518 100644 --- a/day1/session3.tex +++ b/day1/session3.tex @@ -126,12 +126,11 @@ %% % You might wish to add the option [pausesections] %% \end{frame} + \begin{frame} \frametitle{Least Squares Fit} -In this session - \begin{itemize} -\item We shall plot a least squares fit curve for time-period(T) squared vs. length(L) plot of a Simple Pendulum. -\item Given a file containing L and T values +\item Plot a least squares fit line \end{itemize} \end{frame} @@ -148,22 +147,6 @@ Machinery Required - \end{itemize} \end{frame} -\begin{frame}[fragile] -\frametitle{Reading pendulum.txt} -\begin{itemize} - \item The file has two columns - \item Column1 - L; Column2 - T -\end{itemize} -\begin{lstlisting} -In []: L = [] -In []: T = [] -In []: for line in open('pendulum.txt'): - .... ln, t = line.split() - .... L.append(float(ln)) - .... T.append(float(t)) -\end{lstlisting} -We now have two lists L and T -\end{frame} \begin{frame}[fragile] \frametitle{Calculating $T^2$} |