equal
deleted
inserted
replaced
202 |
202 |
203 In []: clf() |
203 In []: clf() |
204 In []: plot(L, TSq, '.') |
204 In []: plot(L, TSq, '.') |
205 Out[]: [<matplotlib.lines.Line2D object at 0xac17e0c>] |
205 Out[]: [<matplotlib.lines.Line2D object at 0xac17e0c>] |
206 \end{lstlisting} |
206 \end{lstlisting} |
|
207 \end{frame} |
|
208 |
|
209 \begin{frame}[fragile] |
|
210 \begin{figure} |
|
211 \includegraphics[width=2in]{data/stline_dots.png} |
|
212 \includegraphics[width=2in]{data/stline_points.png} |
|
213 \end{figure} |
207 \end{frame} |
214 \end{frame} |
208 |
215 |
209 \begin{frame}[fragile] |
216 \begin{frame}[fragile] |
210 \frametitle{Additional Plotting Attributes} |
217 \frametitle{Additional Plotting Attributes} |
211 \begin{itemize} |
218 \begin{itemize} |
326 \end{lstlisting} |
333 \end{lstlisting} |
327 This gives the list \kwrd{TSq} which is the list of squares of T values. |
334 This gives the list \kwrd{TSq} which is the list of squares of T values. |
328 \end{frame} |
335 \end{frame} |
329 |
336 |
330 \begin{frame}[fragile] |
337 \begin{frame}[fragile] |
|
338 \begin{figure} |
|
339 \includegraphics[width=3.5in]{data/L-TSq-limited.png} |
|
340 \end{figure} |
|
341 \end{frame} |
|
342 |
|
343 \begin{frame}[fragile] |
331 \frametitle{More of \texttt{for}} |
344 \frametitle{More of \texttt{for}} |
332 \begin{itemize} |
345 \begin{itemize} |
333 \item Used to iterate over lists |
346 \item Used to iterate over lists |
334 \item Let us look at another example. |
347 \item Let us look at another example. |
335 \end{itemize} |
348 \end{itemize} |
346 6 36 |
359 6 36 |
347 \end{lstlisting} |
360 \end{lstlisting} |
348 \end{frame} |
361 \end{frame} |
349 |
362 |
350 \begin{frame}[fragile] |
363 \begin{frame}[fragile] |
351 \frametitle{Whats unusual about the previous example??} |
364 \frametitle{What about larger data sets??} |
352 \alert{Data is usually present in a file!} \\ |
365 \alert{Data is usually present in a file!} \\ |
353 Lets look at the pendulum.txt file. |
366 Lets look at the pendulum.txt file. |
354 \begin{lstlisting} |
367 \begin{lstlisting} |
355 cat data/pendulum.txt |
368 $cat data/pendulum.txt |
356 1.0000e-01 6.9004e-01 |
369 1.0000e-01 6.9004e-01 |
357 1.1000e-01 6.9497e-01 |
370 1.1000e-01 6.9497e-01 |
358 1.2000e-01 7.4252e-01 |
371 1.2000e-01 7.4252e-01 |
359 1.3000e-01 7.5360e-01 |
372 1.3000e-01 7.5360e-01 |
360 1.4000e-01 8.3568e-01 |
373 1.4000e-01 8.3568e-01 |
398 In []: for t in T: |
411 In []: for t in T: |
399 ....: TSq.append(t*t) |
412 ....: TSq.append(t*t) |
400 |
413 |
401 In []: plot(L, TSq, '.') |
414 In []: plot(L, TSq, '.') |
402 \end{lstlisting} |
415 \end{lstlisting} |
|
416 \end{frame} |
|
417 |
|
418 \begin{frame}[fragile] |
|
419 \begin{figure} |
|
420 \includegraphics[width=3.5in]{data/L-Tsq.png} |
|
421 \end{figure} |
403 \end{frame} |
422 \end{frame} |
404 |
423 |
405 \begin{frame}[fragile] |
424 \begin{frame}[fragile] |
406 \frametitle{Reading files \ldots} |
425 \frametitle{Reading files \ldots} |
407 \typ{In []: for line in open('pendulum.txt'):} |
426 \typ{In []: for line in open('pendulum.txt'):} |
454 In []: type(t) |
473 In []: type(t) |
455 Out[]: <type 'float'> |
474 Out[]: <type 'float'> |
456 \end{lstlisting} |
475 \end{lstlisting} |
457 \end{frame} |
476 \end{frame} |
458 |
477 |
459 \begin{frame}[fragile] |
|
460 \begin{figure} |
|
461 \includegraphics[width=3.5in]{data/L-Tsq.png} |
|
462 \end{figure} |
|
463 \vspace{-0.2in} |
|
464 Coming up - \alert{Least Square Fit \ldots} |
|
465 \end{frame} |
|
466 |
|
467 \section {Summary} |
478 \section {Summary} |
468 \begin{frame} |
479 \begin{frame} |
469 \frametitle{Summary} |
480 \frametitle{Summary} |
470 So what did we learn in this session?? |
481 So what did we learn in this session?? |
471 \begin{itemize} |
482 \begin{itemize} |