# HG changeset patch # User Shantanu # Date 1270935475 -19800 # Node ID 9d61db7bf2f47cf5f6567fb4c9d20aadcb7507a3 # Parent 31173328496deb527d4e142f306a3e6305a74de4 Minor edits. diff -r 31173328496d -r 9d61db7bf2f4 presentations/loadtxt.tex --- a/presentations/loadtxt.tex Sun Apr 11 02:59:46 2010 +0530 +++ b/presentations/loadtxt.tex Sun Apr 11 03:07:55 2010 +0530 @@ -91,7 +91,7 @@ \begin{block}{Goal} \begin{itemize} \item Plotting experimental data from files - advanced - \item Arrays - Introduction + \item Performing statistical operations in an efficient way \end{itemize} \end{block} \begin{block}{Checklist} diff -r 31173328496d -r 9d61db7bf2f4 statistics-script --- a/statistics-script Sun Apr 11 02:59:46 2010 +0530 +++ b/statistics-script Sun Apr 11 03:07:55 2010 +0530 @@ -4,6 +4,7 @@ We used 'for' loops and lists to get data in the desired format. IPython -Pylab also provides a function called 'loadtxt' that can get us the same data in the desired format without much hustle. +We shall use the same pendulum.txt file that we used in the previous session. We know that, pendulum.txt contains two columns, with length being first and time period is second column, so to get both columns in two separate variables we type l, t = loadtxt('pendulum.txt', unpack=True)